qpid broker allows consuming messages from browse-only queue when transactions are used
Environment
- Red Hat Enterprise MRG Messaging 2.3 and 2.3.3
Issue
browse-only
queue used (where any consumer do not cause message removal from the queue, in fact any consumer is just a browser)- a consumer using transactions fetches messages from the queue
- the messages from the queue are really consumed / dequeued
Resolution
Root Cause
-
The underlying bug allowed - when committing a transaction - that any message from the transaction to be dequeued, regardless of its acquired/ended state.
-
Apart from this impact, the bug causes qpid broker segfault when attempting to twice commit the same message acquire - see this solution for details.
Diagnostic Steps
- Reproduction steps:
qpid-send -a "q; {create:always, node:{type:queue, durable:false, x-declare:{arguments:{qpid.browse-only:1}}}}" -m 4
echo "queue depth (should be 4): $(qpid-stat -q q | grep queue-depth | awk '{ print $2 }')"
qpid-receive -a q --tx 2 -m 4 --print-content=no
echo "queue depth (should be 4): $(qpid-stat -q q | grep queue-depth | awk '{ print $2 }')"
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments