java - Can I make a synchronous/blocking call via RabbitMQ using Spring Integration? -
imagine have 2 java apps, , b, using spring integration's rabbitmq support communication.
can make synchronous/blocking call b? if so, how (roughly)?
ideally, has spring integration gateway invokes via e.g. method called
object dosomething(object param)
then blocks while gateway sends on message via rabbitmq serviceactivator on b, , b returns return value, becomes result of dosomething() method.
it seems may possible, docs , other stack overflow questions don't seem address directly.
many thanks!
actually that's true. gateway
pattern implements requirement.
your client blocked wait result gateway's method, underlying integration flow can async
, paralleled
etc.
spring integration amqp provides <int-amqp:outbound-gateway>
blocking request/reply
scenarios rabbitmq.
of course other, receiving side should take care of correlation
send reply appropiriate replytoaddress
request message. simples way use <int-amqp:inbound-gateway>
there.
Comments
Post a Comment