Reputation: 86
I'm wondering if I can configure a queue's max length on activemq, so that when the queue's length touch the limit, the enqueue operation will failed or throw exceptions. is anybody know about this question? any help will be very appreciated.
Thanks a lot.
Upvotes: 3
Views: 16186
Reputation: 18356
Take a look at Producer Flow Control http://activemq.apache.org/producer-flow-control.html
It limits your queue on the amount of memory the queue takes so its not a numbers of messages approach but a memory sizing approach. You can have an exception thrown back to the client when the broker reaches its max resources limit.
Upvotes: 4