Reputation: 381
We are facing an issue with MQ JMS proxy in WSO2 ESB 4.9.0 when bulk messages are pilled up on Queue.
Back end services invoked by proxy can process only 50 requests per second and beyond that our back end services will fail.
The issue here is, when messages are pilled up on the Queue (1000messages), proxy is reading all the messages from the queue and sending to back end services & back end services are failing.
Is there any setting that we can set to on proxy to control message read by proxy service.
Here the main problem is proxy is very quick to read messages from Queue and flooding back end services. Back end services are failing because they are not designed to handle higher load
Upvotes: 1
Views: 475
Reputation: 11
By setting below properties we can enable throttling or control the messages that are being sent to the backend.
Proxy level Throttling using JMS
<parameter name="jms.proxy.throttle.enabled">true</parameter> <parameter name="jms.proxy.throttle.limitPerMinute">3</parameter>
Upvotes: 0
Reputation: 5946
You can define parameters in your proxy service :
<parameter name="transport.jms.ConcurrentConsumers">1</parameter>
<parameter name="transport.jms.MaxMessagesPerTask">1</parameter>
<parameter name="transport.jms.MaxConcurrentConsumers">1</parameter>
(adapt these values to your needs)
Furthermore, if you send a message to a back end service, you can choose to send it in a synchronous manner, using call mediator with blocking="true" : your proxy won't dequeue next jms message until it receive the response from your backend service. If, on the other hand, you use send mediator, it's asynchronous : your mediation will continue while an other thread (callback) wait for the response and therefore, your proxy will dequeue next jms message
Upvotes: 1
Reputation: 664
If you need to listen to a JMS queue and want to send messages to a backend service in a controlled manner, you have to use Message store and Message Processor.
Upvotes: 1