Browse Prior Art Database

Handling of Retained Messages for Durable Subscriptions in a Message Queuing System

IP.com Disclosure Number: IPCOM000216426D
Publication Date: 2012-Apr-05
Document File: 2 page(s) / 54K

Publishing Venue

The IP.com Prior Art Database

Abstract

This article describes a mechanism for handling and managing arbitrary sized messages in a publish-and-subscribe message queuing system, where the message subscribers have registered durable subscriptions but some of those subscribers are not active at the time a message is published. In such a situation the messages must be retained by the queueing system until the subscribers become active but this can result in resource and performance issues. This article outlines one possible way to manage these retained messages such that they do not affect the overall performance of the system.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 01 of 2

Handling of Retained Messages for Durable Subscriptions in a Message Queuing System

In a Publish and Subscribe (PubSub) message queuing system it is normally possible for subscribers to register durable subscriptions to a publishing topic. With a durable subscription to a topic the system will ensure that subscribers receive messages published to that topic even if the subscriber is offline at the point a new message is published - the message being delivered when the subscriber next comes online.

    This requires that the message be retained by the PubSub system until it has been delivered to all durable subscribers. This retention can result in problems if the message is large and/or large numbers of messages remain undelivered. A typical PubSub system would be designed to deliver fast performance with short lived messages, but might not be designed to handle large message retention.

    With PubSub systems becoming more prevalent in mobile networks issues with undelivered messages are likely to be more common, since mobile devices might well be offline for long periods or may be completely removed from the system without cleaning cancelling active subscriptions.

    The usual solution to this problem is to set a 'time-to-live' on the retained message and simply discard it if it has not been received by all subscribers before its time-to-live expires. An alternative is to delete subscriptions if the subscriber has been offline for a long time.

    The Java Message Service is an example of a typical PubSub system which includes durable subscriptions: http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/basics.html.

    The solution herein describes an alternative solution to this problem that allows messages to retained for a longer period of time without unduly impacting system performance.

    In the solution, if a message on a topic remains undelivered for a certain (probably fairly short) period of time, because some of its durable subscribers are offline, the message is removed from the topic and moved to a alternative backing store system. The message on the topic is then replaced with a short 're-delivery notice' containing an address from which the original message can be retrieved.

The advantage of this system is two-fold:


The publishing system does not become full of large undelivered messages


1.

waiting to be delivered. These are replaced with very small messages that the system is probably better able to handle without hitting resource or performance issues. The...