This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Description
I was assuming PublishAsync is non-blocking. But read this in publishAsync:
// Use the buffered channel to control the number of outstanding acks.
pac <- struct{}{}
Then there is chance PublishAysnc being blocked. I would suggest changing to die fast here:
select {
case pac <- struct{}{}:
default:
// Some cleanup
return ErrMaxInFlight
}
Application can choose to publish again or just abandon.