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/12/01 02:34:05 UTC

[GitHub] [pulsar-client-go] wuYin commented on a change in pull request #394: Support sendTimeout

wuYin commented on a change in pull request #394:
URL: https://github.com/apache/pulsar-client-go/pull/394#discussion_r533033581



##########
File path: pulsar/producer_partition.go
##########
@@ -430,26 +432,74 @@ type pendingItem struct {
 	sync.Mutex
 	batchData    internal.Buffer
 	sequenceID   uint64
-	sentAt       int64
+	sentAt       time.Time
 	sendRequests []interface{}
 	completed    bool
 }
 
 func (p *partitionProducer) internalFlushCurrentBatch() {
+	if p.options.SendTimeout > 0 {

Review comment:
       Yes, negative to disable, such as -1 typically.
   https://github.com/apache/pulsar-client-go/blob/master/pulsar/producer.go#L81




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