code: private Observable<ComapiResult<ConversationEventsResponse>> queryEventsRecursively(final RxComapiClient client, final String conversationId, final long lastEventId, final int count, final List<Boolean> successes) {
  
          return client.service().messaging().queryConversationEvents(conversationId, lastEventId, eventsPerQuery)
                  .flatMap(result -> processEventsQueryResponse(result, successes))
                  .flatMap(result -> {
                      if (result.getResult() != null && result.getResult().getEventsInOrder().size() >= eventsPerQuery && count < maxEventQueries) {
                          return queryEventsRecursively(client, conversationId, lastEventId + result.getResult().getEventsInOrder().size(), count + 1, successes);
                      } else {
                          return Observable.just(result);
                      }
                  });
      }
docs: Synchronise missing events for particular conversation.
  
  @param client         Foundation client.
  @param conversationId Unique ID of a conversation.
  @param lastEventId    Last known event id - query should start form it.
  @param count          Number of queries already made.
  @param successes      list of query & processing results in recursive call.
  @return Observable with the merged result of operations.