value 0 for --wait does not work with AMQP
erwindon opened this issue · 0 comments
erwindon commented
Due to a bug in library org.apache.qpid:qpid-amqp-1-0-client-jms:0.32
, the value 0 for --wait
does not work when using AMQP.
The value 0 is interpreted as no-wait, completely opposite the expected behavior of waiting infinitely.
The bug is already clearly marked in the original source code as a "TODO" change.
see package org.apache.qpid.amqp_1_0.jms.impl
, file MessageConsumerImpl.java
, line 258.
I see at least 3 solutions for this:
- instead, use function
receive()
(no parameters) when wait=0, that function does not have the above problem; or - fix the bug upstream and later update to the new version of the client library when dependabot warns for it; or
- switch to another client library for amqp.
nr 1 is the quickest solution, nr 2 is the best solution.
what is your preference?