Closed cescoffier closed 4 years ago
@cescoffier any news on this issue ?
No, I have a workaround, so feel free to remove the milestone
it will be bumped at release time I guess
On Wed, Jul 1, 2020 at 6:52 PM Clement Escoffier notifications@github.com wrote:
No, I have a workaround, so feel free to remove the milestone
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-amqp-client/issues/35#issuecomment-652533470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABXDCVDTLVV7PH5KSUQEDLRZNSWBANCNFSM4NRTAI4Q .
To be clear, proton-j as a whole is single threaded, and essentially everything about a connection transport and its senders/recievers etc must happen on a single thread at a time. There is one outlier: as the proton-j message object is formed from bytes read from a delivery, the message object can sit on its own distinct from the others and be used by another thread at the same time (but is again itself single threaded).
The vertx-amqp-client message object wraps a proton-j message and delivery object. It is its use of the delivery that are not thread safe unless on the context, as they may occur while the context is doing other work for the connection (e.g recieving more messages to accept/release/other). I've raised #49 to have the updates always be done on the context thread.
Because proton-j expects these methods to be called on the event loop having created the message instance, the
accepted
,rejected
,released
.... methods must ensure that the right thread is used.