This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Observer pattern + JMS Pub-Sub

 
kri shan
Ranch Hand
Posts: 1462
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pub-Sub implements Observer pattern.Per my understanding Publisher is Subject and Subscribers are Observers. So publishers state change will be notified to Observers whenever there is a state change.

Do I need to implement any interface method for sending the message in the Subject (TopicPublisher) ?

Which is the right approach to implement the Observer (TopicSubscriber)?
Observer Class implements MessageListener's onMessage(message) (or) Observer Class implements NotificationListener's handleNotification(notification, callback)/
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic