pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #1863: Cpp client: add seek support in consumer for cpp client
Date Fri, 01 Jun 2018 15:02:29 GMT
merlimat commented on a change in pull request #1863: Cpp client: add seek support in consumer
for cpp client
URL: https://github.com/apache/incubator-pulsar/pull/1863#discussion_r192423976
 
 

 ##########
 File path: pulsar-client-cpp/include/pulsar/Consumer.h
 ##########
 @@ -211,6 +211,30 @@ class Consumer {
      */
     void getBrokerConsumerStatsAsync(BrokerConsumerStatsCallback callback);
 
+    /**
+     * Reset the subscription associated with this consumer to a specific message id.
+     * The message id can either be a specific message or represent the first or last messages
in the topic.
+     *
+     * Note: this operation can only be done on non-partitioned topics. For these, one can
rather perform the
+     * seek() on the individual partitions.
+     *
+     * @param messageId
+     *            the message id where to reposition the subscription
+     */
+    Result seek(const MessageId& msgId);
+
+    /**
+     * Asynchronously reset the subscription associated with this consumer to a specific
message id.
+     * The message id can either be a specific message or represent the first or last messages
in the topic.
+     *
+     * Note: this operation can only be done on non-partitioned topics. For these, one can
rather perform the
+     * seek() on the individual partitions.
+     *
+     * @param messageId
+     *            the message id where to reposition the subscription
+     */
+    virtual void seekAsync(const MessageId& msgId, ResultCallback callback);
 
 Review comment:
   @zhaijack  Can you also expose these in C wrapper API so they can be exposed in Go as well?
   
   take a look at `include/pulsar/c/consumer.h" and `lib/c/c_Consumer.cc`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message