Regression: durable subscriber reconnection throws javax.jms.JMSException:
Durable consumer is in use for client: C1 and subscriptionName:
jmsConnectorC1.broadcast
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: AMQ-3330
URL: https://issues.apache.org/jira/browse/AMQ-3330
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.5.0
Reporter: Andrew Perepelytsya
JMS spec section clearly states reconnections rules:
{noformat}
9.3.3.2 Reconnecting to a Topic using a Durable Subscription
To re-connect to a Topic that has an existing durable subscription, the client
program can simply call session.CreateDurableSubscriber again, using the same
parameters that it previously used. A client program may be intermittently
connected. Using durable subscriptions allows messages to still be available to
a client program that consumes from a Topic, even though the client program
was not continuously connected.
/* Reconnect to a durable subscription */
session.createDurableSubscriber(newsFeedTopic, "mySubscription");
This reconnects the client program to the Topic, and any messages that arrived
while the client was disconnected are delivered. However, there are some
important restrictions to be aware of:
• The client must be attached to the same Connection.
• The Destination and subscription name must be the same.
• If a message selector was specified, it must also be the same.
If these conditions are not met, then the durable subscription is deleted, and a
new subscription is created.
{noformat}
My program periodically polls with exactly the same connection, subscription
and client id, however, AMQ 5.5.0 now throws the JMSException, where it was
compliant before (e.g. version 4.1.2)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira