activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Lukica (JIRA)" <>
Subject [jira] Created: (AMQ-1822) DurableConduitBridge: DemandSubscription for queue not removed when processing RemoveInfo
Date Mon, 23 Jun 2008 08:48:00 GMT
DurableConduitBridge: DemandSubscription for queue not removed when processing RemoveInfo

                 Key: AMQ-1822
             Project: ActiveMQ
          Issue Type: Bug
          Components: Connector
    Affects Versions: 5.2.0
            Reporter: Mario Lukica
            Priority: Minor

I have the following problem when using network of brokers connected via DurableConduitBridge:

- when consumer on (non temporary) queue is created on node1, DemandSubscription is created
on node2 (e.g. NC_node1-broker_inboundlocalhost; this is expected) 
- problem: when this consumer is closed, subscription is not removed 

This causes following behaviour: 
- when there are no consumers on given queue on any broker, messages are always forwarded
via NetworkConnector to other broker, if there was consumer at any point in time (since DemandSubscription
is never removed) 

I think the problem lies in DurableConduitBridge, createDemandSubscription method. 

This behavior can be validated by using jconsole (via jmx) and checking subscriptions on given
queue on both brokers, depending on consumer existence on given queue on any broker.

Described behaviour exists in: 4.1.0, 4.1.1, 4.1.2, 5.0.0 and 5.1.0 and 5.2 trunk (670451).

When processing received remote ConsumerInfo, following code is executed: 

        if (info.isDurable() || (info.getDestination().isQueue() && !info.getDestination().isTemporary()))
            info.setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator

Replacing ConsumerId with new (generated) value, causes failure of removal of given subscription
when RemoveInfo is processed with original ConsumerId.

I think that condition should be changed to: 

        if (info.isDurable() || (info.getDestination().isQueue() && info.getDestination().isTemporary()))
            info.setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator

i.e. new ConsumerId should probably be created for temporary queues, and not regular ones.
With this condition changed, DemandSubscription is successfully removed when consumer is closed
on queue on other broker. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message