activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AR (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-5364) MQTT Unsubscribe does not work as intended in network of brokers scenario
Date Thu, 18 Sep 2014 23:26:33 GMT

     [ https://issues.apache.org/jira/browse/AMQ-5364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

AR updated AMQ-5364:
--------------------
    Description: 
I’m trying to make sure that if an unsubscribe() is done for an existing durable topic in
any of the brokers, it takes effect in all the brokers (I.e) no further messages published
to that topic (in any of the brokers) should be received by the client that unsubscribed (when
it connects at a later time after publish).

I’ve explained my test cases below and also I’ve attached my test code. The test numbers
(from the list below) that are failing are 2, 4, 6, 7, 8, 9.

/*  
 * Test if unsubscribe() works as intended in a network of brokers (two) scenario
 * 
 * Setup:
 * Broker1 and Broker2 are networked. 
 *          Broker1(B1)    <----->   Broker2(B2)
 * 
 * B1 is running MQTT transport on 1883 and B2 on 2883 on the same machine. They have a duplex
network connector between them. The MQTT transport connector uses the transport.subscriptionStrategy
option as shown below:
<transportConnector name="mqtt"uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;transport.subscriptionStrategy=mqtt-virtual-topic-subscriptions”/
 * 
 * General flow:
 * 1. Clear any previous durable subs in B1 and B2 (use clean_session = true)
 * 2. Create durable subscription by connecting to B1
 * 3. Publish message in B1
 * 4. Confirm that the durable subscription was created by connecting to B1 and receiving
the message
 * 5. Unsubscribe in B1 or B2 or both
 * 6. Publish message in B1 or B2 or both
 * 7. Connect to B1 (and B2) and make sure message is NOT received
 * 
 * In steps 5 (Unsub) and 6 (Pub), we can perform the steps in B1 or B2 or both. This gives
rise to the following test cases
 *          UnsubB1     UnsubB2     PubB1       PubB2
 * -----------------------------------------------------
 * 1.       false           true            false           true
 * 2.       true            false           false           true
 * 3.       true            true            false           true
 * 4.       false           true            true            false
 * 5.       true            false           true            false
 * 6.       true            true            true            false
 * 7.       false           true            true            true
 * 8.       true            false           true            true
 * 9.       true            true            true            true
 */


  was:
I’m trying to make sure that if an unsubscribe() is done for an existing durable topic in
any of the brokers, it takes effect in all the brokers (I.e) no further messages published
to that topic (in any of the brokers) should be received by the client that unsubscribed (when
it connects at a later time after publish).

I’ve explained my test cases below and also I’ve attached my test code. The test numbers
(from the list below) that are failing are 2, 4, 6, 7, 8, 9.

/*  
 * Test if unsubscribe() works as intended in a network of brokers (two) scenario
 * 
 * Setup:
 * Broker1 and Broker2 are networked.
 *          Broker1(B1)    <----->   Broker2(B2)
 * 
 * General flow:
 * 1. Clear any previous durable subs in B1 and B2 (use clean_session = true)
 * 2. Create durable subscription by connecting to B1
 * 3. Publish message in B1
 * 4. Confirm that the durable subscription was created by connecting to B1 and receiving
the message
 * 5. Unsubscribe in B1 or B2 or both
 * 6. Publish message in B1 or B2 or both
 * 7. Connect to B1 (and B2) and make sure message is NOT received
 * 
 * In steps 5 (Unsub) and 6 (Pub), we can perform the steps in B1 or B2 or both. This gives
rise to the following test cases
 *          UnsubB1     UnsubB2     PubB1       PubB2
 * -----------------------------------------------------
 * 1.       false           true            false           true
 * 2.       true            false           false           true
 * 3.       true            true            false           true
 * 4.       false           true            true            false
 * 5.       true            false           true            false
 * 6.       true            true            true            false
 * 7.       false           true            true            true
 * 8.       true            false           true            true
 * 9.       true            true            true            true
 */



> MQTT Unsubscribe does not work as intended in network of brokers scenario
> -------------------------------------------------------------------------
>
>                 Key: AMQ-5364
>                 URL: https://issues.apache.org/jira/browse/AMQ-5364
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 5.11.0
>            Reporter: AR
>              Labels: mqtt, networkofbrokers
>         Attachments: ActivemqNbTests.tar.gz
>
>
> I’m trying to make sure that if an unsubscribe() is done for an existing durable topic
in any of the brokers, it takes effect in all the brokers (I.e) no further messages published
to that topic (in any of the brokers) should be received by the client that unsubscribed (when
it connects at a later time after publish).
> I’ve explained my test cases below and also I’ve attached my test code. The test
numbers (from the list below) that are failing are 2, 4, 6, 7, 8, 9.
> /*  
>  * Test if unsubscribe() works as intended in a network of brokers (two) scenario
>  * 
>  * Setup:
>  * Broker1 and Broker2 are networked. 
>  *          Broker1(B1)    <----->   Broker2(B2)
>  * 
>  * B1 is running MQTT transport on 1883 and B2 on 2883 on the same machine. They have
a duplex network connector between them. The MQTT transport connector uses the transport.subscriptionStrategy
option as shown below:
> <transportConnector name="mqtt"uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;transport.subscriptionStrategy=mqtt-virtual-topic-subscriptions”/
>  * 
>  * General flow:
>  * 1. Clear any previous durable subs in B1 and B2 (use clean_session = true)
>  * 2. Create durable subscription by connecting to B1
>  * 3. Publish message in B1
>  * 4. Confirm that the durable subscription was created by connecting to B1 and receiving
the message
>  * 5. Unsubscribe in B1 or B2 or both
>  * 6. Publish message in B1 or B2 or both
>  * 7. Connect to B1 (and B2) and make sure message is NOT received
>  * 
>  * In steps 5 (Unsub) and 6 (Pub), we can perform the steps in B1 or B2 or both. This
gives rise to the following test cases
>  *          UnsubB1     UnsubB2     PubB1       PubB2
>  * -----------------------------------------------------
>  * 1.       false           true            false           true
>  * 2.       true            false           false           true
>  * 3.       true            true            false           true
>  * 4.       false           true            true            false
>  * 5.       true            false           true            false
>  * 6.       true            true            true            false
>  * 7.       false           true            true            true
>  * 8.       true            false           true            true
>  * 9.       true            true            true            true
>  */



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message