cckellogg commented on a change in pull request #156: [ISSUE #152][consumer] 
add consumer timeout
URL: https://github.com/apache/pulsar-client-go/pull/156#discussion_r362305966
 
 

 ##########
 File path: pulsar/consumer.go
 ##########
 @@ -135,6 +135,10 @@ type Consumer interface {
        // This calls blocks until a message is available.
        Receive(context.Context) (Message, error)
 
+       // Receive a single message.
+       // This calls blocks until a message is available or timeout.
+       ReceiveBlock(context.Context, time.Duration) (Message, error)
 
 Review comment:
   I don't think we should add this api. The user can wrap a context with a 
timeout in the Receive method. In my opinion this complicates the api and does 
not add anything functionality. 

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


With regards,
Apache Git Services

Reply via email to