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

5. Publish-and-Subscribe Messaging

Chapter 5. Publish-and-Subscribe Messaging

This chapter focuses on the publish-and-subscribe (pub/sub) messaging model. This messaging model is used when you need to broadcast an event or message to many message consumers. Unlike the point-to-point messaging model discussed in Chapter 4, all message consumers (called subscribers) listening on the topic will receive the message.

In this chapter, we will describe the publish-and-subscribe model through the use of a typical broadcast messaging scenario where a mortgage lender publishes its latest mortgage rates for a 30-year fixed mortgage to various borrowers in the hope of attracting one of the borrowers to apply for a mortgage loan. The TLender class will publish a new mortgage rate through a topic, and the TBorrower class will subscribe to the topic and make a decision on whether or not it is a good rate.


  

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