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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -