You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dietrich Bollmann <db...@web.de> on 2006/05/29 12:20:30 UTC

Messages received in wrong order

Hi,

Thinking about a switch to a different JMS provider we are currently 
testing ActiveMQ. As the results of these tests might be interesting 
also for other people, I am posting here a protocol of a small failing test:

* Summary:

Using a very simple producer and consumer (I appended the code to this 
message) the messages are received in the wrong order.

The following setting produced problems in 7 of 10 cases:

  - One broker
  - Two producers sending 100000 messages each
  - One consumer
  - Broker, producers and consumer are all running on the same host.

* Test protocol:

Preparations:

  gunzip test.tar.gz
  tar xvf test.tar
  cd test
  ant compile

Start the broker:

  cd $ACTIVEMQ_HOME
  bin/activemq

Start the consumer:

  ant \
    -DconsumerName=consumer \
    -Durl=tcp://localhost:61616 \
    -DproducerCount=2 \
    -DmessageCount=100000 \
    consumer

Start the producers:
 
  ant \
    -DproducerName=producer1 \
    -Durl=tcp://localhost:61616 \
    -DproducerCount=2 \
    -DmessageCount=100000 \
    producer
 
  ant \
    -DproducerName=producer2 \
    -Durl=tcp://localhost:61616 \
    -DproducerCount=2 \
    -DmessageCount=100000 \
    producer

* Results:

Running the test 10 times the messages were received 3 times in the 
right order and 7 times in a mixed up fashion:

   1. Succesfully received all messages
   2. Wrong message order: Received message 33045 after message 33043 
from producer2
   3. Wrong message order: Received message 97909 after message 97829 
from producer1
   4. Wrong message order: Received message 67839 after message 67837 
from producer2
   5. Wrong message order: Received message 63717 after message 63610 
from producer2
   6. Succesfully received all messages
   7. Wrong message order: Received message 61603 after message 61576 
from producer2
   8. Wrong message order: Received message 51119 after message 49043 
from producer2
   9. Succesfully received all messages
  10. Wrong message order: Received message 99710 after message 99707 
from producer1
    

Thanks
--
Dietrich Bollmann


Re: Messages received in wrong order

Posted by dietrich-bollmann <db...@web.de>.
I posted the sources at http://issues.apache.org/activemq/browse/AMQ-729 -
cheers, Dietrich
--
View this message in context: http://www.nabble.com/Messages+received+in+wrong+order-t1698342.html#a4624120
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Messages received in wrong order

Posted by Hiram Chirino <hi...@hiramchirino.com>.
The Attachment did not make it.  Cou you open a JIRA and attach it at:
http://issues.apache.org/activemq/browse/AMQ

On 5/29/06, Dietrich Bollmann <db...@web.de> wrote:
> Hi,
>
> Thinking about a switch to a different JMS provider we are currently
> testing ActiveMQ. As the results of these tests might be interesting
> also for other people, I am posting here a protocol of a small failing test:
>
> * Summary:
>
> Using a very simple producer and consumer (I appended the code to this
> message) the messages are received in the wrong order.
>
> The following setting produced problems in 7 of 10 cases:
>
>   - One broker
>   - Two producers sending 100000 messages each
>   - One consumer
>   - Broker, producers and consumer are all running on the same host.
>
> * Test protocol:
>
> Preparations:
>
>   gunzip test.tar.gz
>   tar xvf test.tar
>   cd test
>   ant compile
>
> Start the broker:
>
>   cd $ACTIVEMQ_HOME
>   bin/activemq
>
> Start the consumer:
>
>   ant \
>     -DconsumerName=consumer \
>     -Durl=tcp://localhost:61616 \
>     -DproducerCount=2 \
>     -DmessageCount=100000 \
>     consumer
>
> Start the producers:
>
>   ant \
>     -DproducerName=producer1 \
>     -Durl=tcp://localhost:61616 \
>     -DproducerCount=2 \
>     -DmessageCount=100000 \
>     producer
>
>   ant \
>     -DproducerName=producer2 \
>     -Durl=tcp://localhost:61616 \
>     -DproducerCount=2 \
>     -DmessageCount=100000 \
>     producer
>
> * Results:
>
> Running the test 10 times the messages were received 3 times in the
> right order and 7 times in a mixed up fashion:
>
>    1. Succesfully received all messages
>    2. Wrong message order: Received message 33045 after message 33043
> from producer2
>    3. Wrong message order: Received message 97909 after message 97829
> from producer1
>    4. Wrong message order: Received message 67839 after message 67837
> from producer2
>    5. Wrong message order: Received message 63717 after message 63610
> from producer2
>    6. Succesfully received all messages
>    7. Wrong message order: Received message 61603 after message 61576
> from producer2
>    8. Wrong message order: Received message 51119 after message 49043
> from producer2
>    9. Succesfully received all messages
>   10. Wrong message order: Received message 99710 after message 99707
> from producer1
>
>
> Thanks
> --
> Dietrich Bollmann
>
>


-- 
Regards,
Hiram