RobertIndie opened a new issue, #1057:
URL: https://github.com/apache/pulsar-client-go/issues/1057

   #### Expected behavior
   
   The `producer.Flush` should guarantee that all the messages should be 
flushed to the broker.
   
   #### Actual behavior
   
   The flush operation may skip some messages in the producer.
   
   #### Steps to reproduce
   
   ```go
   producer.SendAsync(context.Background(), &ProducerMessage{
                Payload: []byte("hello"),
        }, nil)
   err = producer.Flush()
   if err != nil {
        return
   }
   ```
   Currently, the Flush cannot guarantee that the message `hello` is actually 
flushed to the broker.
   
   The root cause is that when calling the SendAsync, the producer will create 
another go routine to put the message to the queue.
   Therefore, when flush is called, the message may not have entered the queue 
yet.
   
   
   #### System configuration
   **Pulsar Go version**: master
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to