You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "michael j. goulish (JIRA)" <qp...@incubator.apache.org> on 2009/01/27 20:32:59 UTC

[jira] Created: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

unacked persistent messages don't get to messageStore of newbie cluster broker.
-------------------------------------------------------------------------------

                 Key: QPID-1618
                 URL: https://issues.apache.org/jira/browse/QPID-1618
             Project: Qpid
          Issue Type: Bug
          Components: C++ Broker
    Affects Versions: M4
            Reporter: michael j. goulish
            Priority: Critical
         Attachments: unack_newbie.diff


When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.


How to reproduce:   ( this is overview -- actual scripts follow )
========================================================

1. kill any MY_CLUSTER brokers from previous test

2. remove data dirs from previous test, and recreate

3. start node 1 as first member of MY_CLUSTER

4  declare the MY_CLUSTER queue -- durable

5. connect to it with receiver -- use ack frequency of 10;

6. connect with "publish" send only 5 persistent msgs, receiver
   will get them but not ack.

7. start second node

8. when the state transfer completes kill both nodes.
   (receiver should also perish)

9. start up the second node only, as new first member of MY_CLUSTER.
   ( I.e. use 2nd broker's data dir path. )

10. start and attach a new receiver

    PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
                       messageStore.

    RESULT -- new receiver now gets 5 messages.
              durable queue says that "sender confirmed point moved to (5+0)"




==============================================
Scripts for reproducing problem.
==============================================


###################################################################
#############                step  1                 ##############
###################################################################
#! /bin/bash

echo "------------------------------------------------"
echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
echo "------------------------------------------------"
kill -9 `pgrep -f MY_STORE`

echo "There should be no remaining brokers.  Here they are: "
ps -aef | grep qpidd | grep -v grep


###################################################################
#############                step  2                 ##############
###################################################################
#! /bin/bash

echo "------------------------------------------------"
echo "Step 2: remove and rebuild the store data dirs."
echo "------------------------------------------------"
rm -rf ./data
mkdir -p ./data/1 ./data/2

###################################################################
#############                step  3                 ##############
###################################################################
#! /bin/bash


echo "------------------------------------------------"
echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
echo "------------------------------------------------"
rm broker_1.log
$QPID_ROOT/cpp/src/qpidd --no-module-dir            \
  --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
  --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
  --cluster-name MY_CLUSTER -p 5813             \
  --auth=no --mgmt-enable=no                        \
  --log-enable debug --log-to-file ./broker_1.log   \
  --data-dir ./data/1

###################################################################
#############                step  4                 ##############
###################################################################
#! /bin/bash

echo "Step 4: Declaring queue."
$QPID_ROOT/cpp/examples/direct/declare_queues

# !!  NOTE  !!
#         edit declare_queues.cpp to do port 5813
#         in call to session.queueDeclare use arg::durable=true
#         and     arg::queue="MY_QUEUE",
#         edit exchangeBind call to use:
#                 arg::queue = "MY_QUEUE",






###################################################################
#############                step  5                 ##############
###################################################################
#! /bin/bash
echo "Step 5:  Starting receiver..."

$QPID_ROOT/cpp/src/tests/receiver     \
-p 5813                               \
--queue MY_QUEUE                      \
--messages 10                         \
--ack-frequency 10

###################################################################
#############                step  6                 ##############
###################################################################
#! /bin/bash

echo "Publish only 5 messages, so the receiver will not yet ack."

$QPID_ROOT/cpp/src/tests/publish \
-p 5813                          \
--count 5                        \
--durable yes                    \
--destination amq.direct         \
--routing-key routing_key        \
--log-enable debug
#! /bin/bash




###################################################################
#############                step  7                 ##############
###################################################################
rm ./broker_2.log

echo "------------------------------------------------"
echo "Step 7: Start second node, using Store in ./data/2 ."
echo "   note!  you should see correct store dirs replicated to this broker."
echo "------------------------------------------------"

$QPID_ROOT/cpp/src/qpidd --no-module-dir            \
  --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
  --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
  --cluster-name MY_CLUSTER -p 5814                   \
  --auth=no --mgmt-enable=no                          \
  --log-enable debug --log-to-file ./broker_2.log     \
  --data-dir ./data/2


###################################################################
#############                step  8                 ##############
###################################################################
#! /bin/bash

echo "When the second node is up and synced, kill both nodes."
echo "   note:  receiver should now die also."

kill -9 `pgrep -f MY_CLUSTER`

ps -aef | grep qpidd | grep -v grep



###################################################################
#############                step  9                 ##############
###################################################################
#! /bin/bash
echo "------------------------------------------------"
echo "Step 9: Start second node, using Store in ./data/2 ."
echo "------------------------------------------------"
$QPID_ROOT/cpp/src/qpidd --no-module-dir            \
  --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
  --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
  --cluster-name MY_CLUSTER -p 5813             \
  --auth=no --mgmt-enable=yes                       \
  --log-enable debug --log-to-file ./broker_3.log   \
  --data-dir ./data/2



###################################################################
#############                step  10                ##############
###################################################################
#! /bin/bash

echo " "
echo "Start final receiver -- it should get unacked messages."
echo " "
$QPID_ROOT/cpp/src/tests/receiver     \
-p 5813                               \
--queue MY_QUEUE                      \
--messages 10                         \
--ack-frequency 5











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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "Carl Trieloff (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667802#action_12667802 ] 

Carl Trieloff commented on QPID-1618:
-------------------------------------

*********cluster_test.cpp(335): error in "testUnacked": check c1.session.queueQuery("q2").getMessageCount() == 1u failed [3 != 1]
cluster_test.cpp(348): error in "testUnacked": check c1.session.queueQuery("q2").getMessageCount() == 2u failed [4 != 2]
fork1: 2009-jan-27 15:40:04 error Unexpected exception: Attempted size underflow on dequeue(2): size: max=104857600, current=0; count: unlimited; type=flow_to_disk (qpid/broker/QueuePolicy.cpp:54)
fork1: 2009-jan-27 15:40:04 error Connection 127.0.0.1:44346 closed by error: Attempted size underflow on dequeue(2): size: max=104857600, current=0; count: unlimited; type=flow_to_disk (qpid/broker/QueuePolicy.cpp:54)(501)
fork1: 2009-jan-27 15:40:04 error Channel exception: not-attached: Channel 2 is not attached (qpid/amqp_0_10/SessionHandler.cpp:67)
fork1: 2009-jan-27 15:40:04 error Channel exception: not-attached: Channel 2 is not attached (qpid/amqp_0_10/SessionHandler.cpp:67)
2009-jan-27 15:40:04 error amq.failover990cec59-208f-4113-98e1-e416e8208987@guest error: framing-error: Attempted size underflow on dequeue(2): size: max=104857600, current=0; count: unlimited; type=flow_to_disk (qpid/broker/QueuePolicy.cpp:54)
2009-jan-27 15:40:04 error framing-error: Attempted size underflow on dequeue(2): size: max=104857600, current=0; count: unlimited; type=flow_to_disk (qpid/broker/QueuePolicy.cpp:54) (qpid/client/FailoverListener.cpp:73)
unknown location(0): fatal error in "testUnacked": std::exception: framing-error: Attempted size underflow on dequeue(2): size: max=104857600, current=0; count: unlimited; type=flow_to_disk (qpid/broker/QueuePolicy.cpp:54)
cluster_test.cpp(350): last checkpoint


> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: unack_newbie.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment:     (was: qpid_1618.diff)

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: qpid_1618.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Resolved: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Conway resolved QPID-1618.
-------------------------------

    Resolution: Fixed

Commited the code change in revision 741123 based on manual testing. 
Unit test needs some work: 
 - use the ClusterFixuture class from cluster_tests to avoid sleeping
 - get rid of mktemp/mkstemp warning 
 - fix strange error in exception_test when the test is run.

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Assignee: Alan Conway
>            Priority: Critical
>         Attachments: qpid_1618.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment: persist.diff

New fix for same problem.


> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: persist.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment: qpid_1618.diff

almost the same change as before -- force message enqueue-to-store during cluster newbie braindump if the message has not been acked.

except now there's a unit test. 

Unit test does this:

  1. derive new class from NullMessageStore
  2. make a plugin out of it.
  3. use ForkedBroker to make a 2-cluster where both brokers use these specialized NullMessageStores
  4. Make sure that the second one enqueues its unacked messages.  (In this case "enqueue" means "put in the store" (!) )



> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: qpid_1618.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment: unack_newbie.diff

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: unack_newbie.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Assigned: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "Alan Conway (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Conway reassigned QPID-1618:
---------------------------------

    Assignee: Alan Conway

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Assignee: Alan Conway
>            Priority: Critical
>         Attachments: qpid_1618.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment: qpid_1618.diff

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>         Attachments: qpid_1618.diff
>
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment:     (was: unack_newbie.diff)

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-1618) unacked persistent messages don't get to messageStore of newbie cluster broker.

Posted by "michael j. goulish (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

michael j. goulish updated QPID-1618:
-------------------------------------

    Attachment:     (was: persist.diff)

> unacked persistent messages don't get to messageStore of newbie cluster broker.
> -------------------------------------------------------------------------------
>
>                 Key: QPID-1618
>                 URL: https://issues.apache.org/jira/browse/QPID-1618
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M4
>            Reporter: michael j. goulish
>            Priority: Critical
>
> When a new broker is added to a cluster, persistent messages that have not yet been ACKed do not get stored in the new brokers messageStore.
> How to reproduce:   ( this is overview -- actual scripts follow )
> ========================================================
> 1. kill any MY_CLUSTER brokers from previous test
> 2. remove data dirs from previous test, and recreate
> 3. start node 1 as first member of MY_CLUSTER
> 4  declare the MY_CLUSTER queue -- durable
> 5. connect to it with receiver -- use ack frequency of 10;
> 6. connect with "publish" send only 5 persistent msgs, receiver
>    will get them but not ack.
> 7. start second node
> 8. when the state transfer completes kill both nodes.
>    (receiver should also perish)
> 9. start up the second node only, as new first member of MY_CLUSTER.
>    ( I.e. use 2nd broker's data dir path. )
> 10. start and attach a new receiver
>     PREVIOUS RESULT -- nothing.  messages were never stored in broker2's
>                        messageStore.
>     RESULT -- new receiver now gets 5 messages.
>               durable queue says that "sender confirmed point moved to (5+0)"
> ==============================================
> Scripts for reproducing problem.
> ==============================================
> ###################################################################
> #############                step  1                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 1: Kill any brokers already running in the MY_CLUSTER cluster"
> echo "------------------------------------------------"
> kill -9 `pgrep -f MY_STORE`
> echo "There should be no remaining brokers.  Here they are: "
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  2                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 2: remove and rebuild the store data dirs."
> echo "------------------------------------------------"
> rm -rf ./data
> mkdir -p ./data/1 ./data/2
> ###################################################################
> #############                step  3                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 3: Start the first broker in a cluster, using Store in ./data/1 ."
> echo "------------------------------------------------"
> rm broker_1.log
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=no                        \
>   --log-enable debug --log-to-file ./broker_1.log   \
>   --data-dir ./data/1
> ###################################################################
> #############                step  4                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 4: Declaring queue."
> $QPID_ROOT/cpp/examples/direct/declare_queues
> # !!  NOTE  !!
> #         edit declare_queues.cpp to do port 5813
> #         in call to session.queueDeclare use arg::durable=true
> #         and     arg::queue="MY_QUEUE",
> #         edit exchangeBind call to use:
> #                 arg::queue = "MY_QUEUE",
> ###################################################################
> #############                step  5                 ##############
> ###################################################################
> #! /bin/bash
> echo "Step 5:  Starting receiver..."
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 10
> ###################################################################
> #############                step  6                 ##############
> ###################################################################
> #! /bin/bash
> echo "Publish only 5 messages, so the receiver will not yet ack."
> $QPID_ROOT/cpp/src/tests/publish \
> -p 5813                          \
> --count 5                        \
> --durable yes                    \
> --destination amq.direct         \
> --routing-key routing_key        \
> --log-enable debug
> #! /bin/bash
> ###################################################################
> #############                step  7                 ##############
> ###################################################################
> rm ./broker_2.log
> echo "------------------------------------------------"
> echo "Step 7: Start second node, using Store in ./data/2 ."
> echo "   note!  you should see correct store dirs replicated to this broker."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5814                   \
>   --auth=no --mgmt-enable=no                          \
>   --log-enable debug --log-to-file ./broker_2.log     \
>   --data-dir ./data/2
> ###################################################################
> #############                step  8                 ##############
> ###################################################################
> #! /bin/bash
> echo "When the second node is up and synced, kill both nodes."
> echo "   note:  receiver should now die also."
> kill -9 `pgrep -f MY_CLUSTER`
> ps -aef | grep qpidd | grep -v grep
> ###################################################################
> #############                step  9                 ##############
> ###################################################################
> #! /bin/bash
> echo "------------------------------------------------"
> echo "Step 9: Start second node, using Store in ./data/2 ."
> echo "------------------------------------------------"
> $QPID_ROOT/cpp/src/qpidd --no-module-dir            \
>   --load-module $QPID_ROOT/cpp/src/.libs/cluster.so \
>   --load-module $STORE_ROOT/cpp/lib/.libs/msgstore.so \
>   --cluster-name MY_CLUSTER -p 5813             \
>   --auth=no --mgmt-enable=yes                       \
>   --log-enable debug --log-to-file ./broker_3.log   \
>   --data-dir ./data/2
> ###################################################################
> #############                step  10                ##############
> ###################################################################
> #! /bin/bash
> echo " "
> echo "Start final receiver -- it should get unacked messages."
> echo " "
> $QPID_ROOT/cpp/src/tests/receiver     \
> -p 5813                               \
> --queue MY_QUEUE                      \
> --messages 10                         \
> --ack-frequency 5

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org