Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Durable Subscriptions vs Non-Durable Subscriptions

Posted on 2013-05-27
2
Medium Priority
?
547 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 36

Accepted Solution

by:
mccarl earned 1000 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
A solution for Fortify Path Manipulation.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

963 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