Solved

Durable Subscriptions vs Non-Durable Subscriptions

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

747 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

10 Experts available now in Live!

Get 1:1 Help Now