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 2020/07/10 02:51:53 UTC

[GitHub] [pulsar] wolfstudy commented on issue #7480: native go v0.1.1 No support produce batch?

wolfstudy commented on issue #7480:
URL: https://github.com/apache/pulsar/issues/7480#issuecomment-656451119


   @sxpsxp12 In fact, we have already supported the batch function on the produce side. By default, the batch is enabled.
   
   ```
   producer, err := client.CreateProducer(ProducerOptions{
   		Topic:                   topicName,
   		DisableBatching:         false,
   		BatchingMaxMessages:     uint(numOfMessages),
   		BatchingMaxPublishDelay: time.Second * 10,
   		Properties: map[string]string{
   			"producer-name": "test-producer-name",
   			"producer-id":   "test-producer-id",
   		},
   	})
   	assert.Nil(t, err)
   	defer producer.Close()
   ```


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