On 12/10/18 22:03, Gordon Sim wrote:
On 12/10/18 21:57, areddy wrote:
Thank you. I'll try on_connection_error.
This happens once every ~500 messages. Most of the time messages are
being
transmitted correctly and accepted by activemq. I'm running activemq
5.15.6.
*PS:* I'm running a multithreaded application where threads share an
instance of the MessageHandler. I added locks to make the send function
thread safe.
I'm not sure you can do that safely. It is not just the send but any
access to the connection. I can't see how you could reliably use locking
to ensure other threads don't interfere with the event thread. You
really want to use EventInjector to ensure that only the event thread
tries to use the connection.
That said the hex looks like it is coming from the broker, and it does
look like a perfectly valid transfer frame.
(If the problem was that the client was sending badly encoded data due
to some race, I would expect the hex as reported by the broker to be
garbled).
Would be worth running wireshark to see if that spots anything.
Or see if there is any pattern to the failures (are the messages all
essentially of the same form?).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]