Solved

Durable Subscriptions vs Non-Durable Subscriptions

Posted on 2013-05-27
2
437 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 85
Java Timer (static) 9 43
java jdbc batch example 8 29
What's wrong with this code? 4 21
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

815 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now