megarajtm opened a new issue #515: URL: https://github.com/apache/pulsar-client-go/issues/515
Producer Send and SendAsyn is blocked forever when pulsar is down if the MaxReconnectToBroker is set to ultimate. In case of pulsar down scenarios, within `runEventsLoop`in `producer_partition.go`, the call enters `reconnectToBroker` and remains in a forever loop until the pulsar broker connection is established. Due to this, no more events are consumed from `eventsChan` channel cause both Send and SendAsyn to be blocked. Due to this even the `SendTimeout` would also be not honoured. #### Expected behavior Producer Send must not be blocked forever when the pulsar broker is down. It must honour the SendTimeout and return back with an error. Producer SendAsyn must never be blocked when the pulsar broker is down. It must honour the SendTimeout and call the callback function. #### Actual behavior Due the above mentioned issue Producer Send/SendAsyn blocks forever when the pulsar broker is down #### Steps to reproduce 1. Create a pulsar producer and set the MaxReconnectToBroker as ultimate and SendTimeout as a fixed value 2. Send messages to pulsar using Send or SendAsyn API 3. Bring down pulsar broker or inject a connection error between broker and client 4. In case of Send, the call is blocker forever. In case of SendAsyn, the callback is never called and once the `pendingQueue` is filled, the call is blocked forever. #### System configuration Pulsar client version - v0.4.0 -- 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: [email protected]
