0

Good morning, I have a queue in a wso2 message broker. I would like to know if in java there is a way to be able to consult the elements of a queue without deleting them. I tried to use the QueueBrowser but the application goes me wrong (my question --> JMS: Server closed connection and reconnection not permitted). The connection is correct because if I create a consumer it works for me I wanted to know if you knew another way.

Thank you.

Robertone
  • 7
  • 1
  • 4

1 Answers1

0

It should work and looking at your code in the linked question it seems correct. A very dirty approach is to actually read the messages within a transaction and rollback when done. Transactions are not always supported, though, and regardless reading and rolling back is expensive, so I would only do that as a last resort.

ewramner
  • 5,810
  • 2
  • 17
  • 33