What is meaning of WARNING "create subscriber failed: detected duplicate durable subscription [Topic name] for topic [Topic name]?

What is meaning of WARNING "create subscriber failed: detected duplicate durable subscription [Topic name] for topic [Topic name]?

book

Article ID: KB0090070

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
Description:
============

The warning indicates that an attempt was made to start two durable subscribers with the same name at the same time. For TIBCO Enterprise Message Service (EMS), starting two durable subscribers with the same name at the same time is not allowed.  If an attempt is made to do so, the above exception "create subscriber failed: detected duplicate durable subscription [Topic name] for topic [Topic name]" will be thrown as soon as the second durable subscriber is started.

From the JMS specification:

A durable subscriber registers a durable subscription with a unique identity that is retained by JMS.

The durable name is used to identify the durable subscription. Here is copy-paste from JMS specification:

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               String name)
                                        throws JMSExceptionCreates a durable subscriber to the specified topic.

If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable TopicSubscriber. The JMS provider retains a record of this durable subscription and insures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired.

Sessions with durable subscribers must always provide the same client identifier. In addition, each client must specify a name that uniquely identifies (within client identifier) each durable subscription it creates. Only one session at a time can have a TopicSubscriber for a particular durable subscription.

A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name and a new topic and/or message selector. Changing a durable subscriber is equivalent to unsubscribing (deleting) the old one and creating a new one.

In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

Parameters:

topic - the non-temporary Topic to subscribe to
name - the name used to identify this subscription

Throws:

JMSException - if the session fails to create a subscriber due to some internal error.
InvalidDestinationException - if an invalid topic is specified.

Since JMS 1.1:

A second durable subscriber should be able to start and run if the first durable was brought down first, regardless if the second durable subscriber is running on the same and / or a different host than the first one.

EMS supported creating multiple durable subscribers for the same topic using tibemsadmin command "create durable &lttopic> &ltname> [&ltproperties>]".

Issue/Introduction

What is meaning of WARNING "create subscriber failed: detected duplicate durable subscription [Topic name] for topic [Topic name]?