You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Andrew Perepelytsya (JIRA)" <ji...@apache.org> on 2011/05/19 18:46:47 UTC

[jira] [Created] (AMQ-3330) Regression: durable subscriber reconnection throws javax.jms.JMSException: Durable consumer is in use for client: C1 and subscriptionName: jmsConnectorC1.broadcast

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

[jira] [Commented] (AMQ-3330) Regression: durable subscriber reconnection throws javax.jms.JMSException: Durable consumer is in use for client: C1 and subscriptionName: jmsConnectorC1.broadcast

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036384#comment-13036384 ] 

Gary Tully commented on AMQ-3330:
---------------------------------

Is the previous connection closed and not pooled? Can you provide a simple jms unit test that can reproduce?

> 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

[jira] [Closed] (AMQ-3330) Regression: durable subscriber reconnection throws javax.jms.JMSException: Durable consumer is in use for client: C1 and subscriptionName: jmsConnectorC1.broadcast

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQ-3330.
-----------------------------

    Resolution: Incomplete

Not test provided to reproduce the issue.  This is most likely a case of either attempt to connect while another pooled connection already exists with the same client id, or a case of a stomp consumer that has not cleanly disconnected from the broker.

> 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

       

[jira] [Commented] (AMQ-3330) Regression: durable subscriber reconnection throws javax.jms.JMSException: Durable consumer is in use for client: C1 and subscriptionName: jmsConnectorC1.broadcast

Posted by "Andrew Perepelytsya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036295#comment-13036295 ] 

Andrew Perepelytsya commented on AMQ-3330:
------------------------------------------

Typical log:
{noformat}
Caused by: javax.jms.JMSException: Durable consumer is in use for client: C1 and subscriptionName: mule.jmsConnectorC1.broadcast
	at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:74)
	at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:450)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
	at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:79)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:95)
	at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:546)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:306)
	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
	at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:218)
	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)
	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
	... 3 more
{noformat}

> 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