hello what is difference between PollableChannel and SubscribableChannel?
hello what is difference between PollableChannel and SubscribableChannel?
A PollableChannel provides a receive() method to be actively invoked by Polling Consumers, while a SubscribableChannel provides a subscribe() method so that Event Driven Consumers are invoked when a Message arrives.
Does that clarify?
-Mark
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf
EventDriven model = SubscribableChannel
On Demand (where you are in control of demand) = PollableChannel.
Oleg Zhurakousky
Spring Integration team
http://twitter.com/z_oleg
http://blog.springsource.com/author/ozhurakousky/
Thanks for reply but need more help in understanding.
Is it like PollableChannel is synchronous messaging and SubsribeableChannel is asynchronous messageing
receive() method in PollableChannel does not have argument. (PULL)
but subscribe() method needs MessageHandler.(PUSH)
Yes, you've got it. The receive() method actually returns a Message while the subscribe() method allows registration of a MessageHandler to be invoked asynchronously.
You can find more information in the reference manual:
http://static.springsource.org/sprin...reference.html
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf
Thank you. Now I got it.![]()