Solved

Durable Subscriptions vs Non-Durable Subscriptions

Posted on 2013-05-27
2
469 Views
Last Modified: 2013-06-01
I would like to know differences, similarities, uses, advantages, dis advantages, practical uses  of Durable Subscriptions vs Non-Durable Subscriptions.

Is point to point model is same as Non-Durable Subscriptions since Non-Durable Subscriptions also works when it is active right.

Any links, sample code, resources, ideas highly appreciated. Thanks in advace
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 250 total points
ID: 39201435
Both subscriptions are associated with a Topic. The difference is that for a Durable subscription, the broker will actually essentially save a copy of every message that get published to the Topic, so that even if your application has been down, when it starts again, it will receive all those messages that it missed. Whereas a Non-durable subscription, there is NO saving or messages, you only get those messages that are published while your app is up and subscribed to the topic.

Is point to point model is same as Non-Durable Subscriptions since Non-Durable Subscriptions also works when it is active right.
Definitely NOT. If anything, the durable subscription is the closest to point-to-point, because you can think of it as the broker simulating a queue that can hold the messages that haven't been consumed because the subscriber was down. And if there are multiple durable subscriptions, that broker has to keep track of multiple possible different sets of messages that are waiting to be delivered to the subscribers when they come back up. But you still wouldn't call it point-to-point.
0
 
LVL 19

Assisted Solution

by:Jim Cakalic
Jim Cakalic earned 250 total points
ID: 39202305
Many of your questions can be answered here:
http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/basics.html

By default, with non-durable subscriptions, if the consumer is down there is no guarantee of message delivery to that consumer. The topic manager doesn't remember that you are interested in the messages while the consumer is "away". Durable subscriptions allow a consumer to tell the topic manager that they want to know about all messages even if they arrive while the consumer is not running (active).

You would choose durable subscription in an application where the number of consumers is unknown (or variable) but you want reliable delivery to every consumer. For instance, in a loosely coupled architecture, the inventory system may publish an event on a topic whenever the price or availability of a product changes. Other systems are interested in the event for their own purposes. Some of them may be interested in the event while others are required to process the event. The inventory system doesn't know all the other systems receiving the message (loose coupling) so it doesn't send a message to each system individually. It publishes the message on a topic and other systems subscribe to the topic as durable or non-durable consumers depending on how strong their interest is in receiving all the messages.

Here's a link to an IBM System's Magazine article that might be of interest:
http://www.ibmsystemsmag.com/ibmi/developer/websphere/Writing-Your-First-WAS-5-0-for-iSeries-JMS-pub-sub/

Regards,
Jim Cakalic
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jboss 7.1 start up error 1 84
CSV file parsing thru Java 13 54
Website checklist for browser compatibility? 2 57
Java import explained 4 49
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question