• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Related to Pub/Sub Model

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,
Can anybody tell me about the difference between persistent & durable messages related to Pub/Sub Model.
Some books & site atrticles talk about "Persistent Publisher & Durable Subscriber" what exactly this stuff is?
Can I send persistent messages using TopicPublisher? & what will be its use?


don't mind for too many questions

Thanks in Advance
Shrinivas
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I'm not sure which of those terms covers exactly what, but sometimes you want a message to get to a subscriber whether they are currently present or not. You can put the message into a persistant queue (usually backed by a database) so it won't be lost if the subscriber is not running. Then when the subscriber starts up or comes into existence it can pull queued messages at its leisure. See Enterprise Integration Patterns (by Thoughtworker Gregor Hohpe) for much more on this kind of thing.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody help me related to this issue?

Shrinivas
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,



No help yet!!!



Shrinivas
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Shrinivas,

You have 2 kinds of Pub/Sub models: Durable and non-durable.

The durable model is actually as Stan told you earlier:
You use persistent messages in combination with durable subscribers when you want your messages retained even when your message consumer is not connected. This means that your messages are 'saved' untill your consumer connects again.

Non-durable means that if you use non-durable subscribers and non-persistent messages then a message sent to a consumer that is not connected is 'lost' for that consumer.

Hope this helps,
Lars
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello lars
Thanks for the help first of all. Question remains in my mind about one combination non-durable subscriber & Persistent messages.what will happen for this?


Regards
Shrinivas
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the Enterprise Integration Patterns site I mentioned before Durable Subscriber looks like persistent messaging is an implementation detail in building Durable Subscriptions.

There is a relationship we haven't hit yet, and I don't know if it has a name. Let's say the subscriber always exists - the first thing created at system startup and the last thing destroyed - but publishers come and go all day. Open a window, create a new publisher. Log on a user, create a new publisher. The vanilla Observer pattern doesn't handle this because the Observer needs a reference to the Observable so it can sign up for messages. Some intermediary is needed to manage subscriptions. This is an option that is barely mentioned in the GoF on Observer but JMS handles it as a natural part of life.
 
Lars Vonk
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, Stan is right. Persistent messages are indeed an implementation detail of durable subscribtions.

Lars
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic