Spring Integration : Publish Subscribe channel. Is it asynchronous? -


i using publish-subscribe channel after inbound gateway receives string message parallely send logger log message , transformer transform message. want both these acivities happen in parallel.

my question simple - publish subscribe channel in spring integration sends messages it's subscibers parallely?

below code snippet source of spring-integration-context.xml.

<int:gateway id="gateway" service-interface="com.test.gateway">     </int:gateway> <int:publish-subscribe-channel id="publishsubscribechannel" />  <int:service-activator input-channel="publishsubscribechannel"         method="transformevent" ref="transformer" output-channel="transformerreplychannel"> </int:service-activator> <int:service-activator input-channel="publishsubscribechannel"         method="logmessage" ref="logger"> </int:service-activator> 

here transformer , logger 2 subscribers publishsubscribechannel. in setup message flow logger , transformer gateway happen asynchronously default??...or need other configuration achieve same.

by default, runs in sequence. in case, transformer, logger. if want run in parallel, need specify task-executor

<int:publish-subscribe-channel id="publishsubscribechannel" task-executor="executor" /> ... <task:executor id="executor" pool-size="10" /> 

and using task-executor, message handling performed asynchronously.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -