0

I have an ActiveMQ (AmazonMQ) queue which normally stores between 100-150K messages at any given time before they are set to expire after a 24 hour period (JMSExpiration). I would like to browse the said queue using a JMS selector such as JMSTimestamp > 1711198800000.

Unfortunately, such JMS queries only appear to span the first 400 messages in the queue and seem unable to query all other messages in the queue beyond that depth. I have tried using both JMSToolBox and amazonmq-cli but neither tool seems to be able to query beyond said limit.

I've noticed that If I query a page at a time, using the previously mentioned JMS selector query in a way that picks up where the last message of the previous result set left off I can "advance" the query cursor (if such thing does exist) until I get to the desired results but this is impractical when there exists a large number of messages in the queue. I've googled for anything online that confirms this behaviour but have come up empty so far. Has anyone tackled this problem before?

1 Answer 1

1

Check out the maxBrowsePageSize which is defined as:

The maximum number of messages to page in from the store at one time for a browser.

The default is 400.

Keep in mind that the larger maxBrowsePageSize value the more memory that browsing messages will consume. Ultimately you may find that you're using an anti-pattern by treating the message broker like a database.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.