spring integration - JMS Outbound Gateway response read throttling -
i have jms outbound gateway sends messages out via request queue , receives messages in via response queue. know simplest way apply throttling receive part of messages off response queue. have tried setting poller
outbound gateway but, when set it, response messages not consumed @ all. can poller
used in outbound gateways purpose of message consumption throttling? if so, how? if not, how can best throttle message response consumption instead?
my stack is:
o.s.i:spring-integration-java-dsl:1.0.0.rc1 o.s.i:spring-integration-jms:4.0.4.release
my integrationgconfig.class:
@configuration @enableintegration public class integrationconfig { ... @bean public integrationflow testflow() { return integrationflows .from("test.request.ch") .handle(jms.outboundgateway(connectionfactory) .receivetimeout(45000) .requestdestination("request_queue") .replydestination("response_queue") .correlationkey("jmscorrelationid"), e -> { e.requiresreply(true); e.poller(pollers.fixedrate(1000).maxmessagesperpoll(2)); // when poller set, response messages not consumed @ all... }) .handle("testservice", "testmethod") .channel("test.response.ch").get(); } ... }
cheers, pm
since going fetch messages response queue
.poller()
doesn't you.
we need poller
if our endpoint's input-channel
(in case test.request.ch
) pollablechannel
. see docs on matter.
there .replycontainer()
option on jms.outboundgateway
you. can configure concurrentconsumers
options achieve better throughput on response queue
.
otherwise jmsoutboundgateway
creates messageconsumer
each request message.
Comments
Post a Comment