Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Message Channels > Direct Channel

Direct Channel

DirectChannel is a mixed type channel with both P2P and Pub/Sub characteristics. It implements SubscribableChannel so you need to have a concrete implementation of MessageHandler subscribing to it. Messages can be consumed by subscribed handlers, but only one subscriber will be getting each message, thus displaying P2P semantics. Even if you have registered multiple subscribers, the channel will deliver to only one of them. The framework uses the round-robin strategy to choose a recipient from the multiple subscribers.

The production and consumption of the message are both executed in the same thread. This usage is very helpful for Enterprise applications with transactions spanning multiple resources.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint