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/20 05:59:18 UTC

[GitHub] [pulsar-client-go] banishee opened a new issue #57: the function Send() performance

banishee opened a new issue #57: the function Send() performance 
URL: https://github.com/apache/pulsar-client-go/issues/57
 
 
   ## Expected behavior
   
   I want to send a quantity of messages using this pulsar-client-go, and I hope it can be done in less than 1 second
   
   ## Actual behavior
   
   I call Send(ctx,msg) about 2000 times in a loop, it costs me 6 seconds to finish totally.
   One message's capacity is 60 Bytes or so.
   
   ## Steps to reproduce
   
          for i:=0; i<2000; i++ {		
                           ..........
   		msg, err := proto.Marshal(&xxx)
   		if err != nil {
   			fmt.Println(err)
   			return
   		}
   
   		if err := producer.Send(context.Background(), &pulsar.ProducerMessage{Payload: msg}); err != nil {
   			fmt.Println(err)
   		} else {
   			//fmt.Printf("[%d]success\n", i)
   		}
   	}
   ## System configuration
   
   OS: macOS 10.14
   docker in localhost: apachepulsar/pulsar-standalone:2.3.1 bin/pulsar standalone

----------------------------------------------------------------
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