Unfortunately the message never gets sent although Publish returns nil. The reason for this behavior is the asynchronous message processing within the library.
Is there any way to reliably wait for a message to get sent?
I could imagine that initializing the cli.conn.send channel with a capacity of 0 (ie. setting sendBufSize = 0) could resolve the issue but I wanted to ask here first whether this is the right approach.
I have a simple application that just sends one single message and then terminates:
Unfortunately the message never gets sent although
Publish
returnsnil
. The reason for this behavior is the asynchronous message processing within the library.Is there any way to reliably wait for a message to get sent?
I could imagine that initializing the
cli.conn.send
channel with a capacity of 0 (ie. settingsendBufSize = 0
) could resolve the issue but I wanted to ask here first whether this is the right approach.