You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/08/09 14:19:01 UTC

[GitHub] [pulsar-client-go] jiazhai commented on a change in pull request #43: Support partition consumer receive async and fix batch logic

jiazhai commented on a change in pull request #43: Support partition consumer receive async and fix batch logic
URL: https://github.com/apache/pulsar-client-go/pull/43#discussion_r312500980
 
 

 ##########
 File path: pulsar/impl_consumer.go
 ##########
 @@ -154,27 +155,47 @@ func (c *consumer) Unsubscribe() error {
 }
 
 func (c *consumer) Receive(ctx context.Context) (Message, error) {
+	if len(c.consumers) > 1 {
+		for _, pc := range c.consumers {
+			go func(pc Consumer) {
+				for {
+					msg, err := pc.Receive(ctx)
 
 Review comment:
   Please follow java/cpp logic, load c.queue in background, not at the time receive is called. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services