Hi Tim,

Thanks for the point, with activemq-all-5.9-SNAPSHOT I was able to run my
test.  Bad news it that it's still failing with the same "message missing"
trouble.  Here is a line of logs as the evidence that I ran the test with
5.9-SNAPSHOT correctly:

-----
21:58:32,643 INFO  [BrokerService] Apache ActiveMQ 5.9-SNAPSHOT
(broker-tcp:__weehomespent-lm:61616,
ID:weehomespent-lm-63775-1364360312513-0:1) started
-----

This looks simply critical as it's violating one of primitive messaging
functions: "no message missing" whereas the trouble is relatively easy to
reproduce, so I wonder how the problem hasn't been reported so far so long
if this is a bug.

The test scenario is quite simple, let me repeat just once more:

1. Instantiate broker service using activemq embedded broker.  Every
configuration is by default except for the persistent flag.  Set persistent
to false for the broker: BrokerService#setPersistent(false).

2. With JMS API, create 1 producer and 1 durable subscriber on different
connections then start them in parallel.

3. Producer sends 100 messages (sleeps 1ms between sending) to the topic. 
Uses DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY and
Message.DEFAULT_TIME_TO_LIVE for the arguments to send method.

4. Durable subscriber receives 100 messages with Session.AUTO_ACKNOWLEDGE.
The important scenario is that, *it reconnects every after 2 message
consumption*.  It does what follows when it reconnects:
1) Connection#stop
2) TopicSubscriber#close
3) Connection#close
4) recreate all again: Connection (from ConnectionFactory), then Session,
then TopicSubscriber.
5) Connection#start
6) resume receiving with TopicSubscriber...

5. For 100 message consumption in total with reconnection by every 2 message
consumption, the durable subscriber is supposed to reconnect around 50
times.  The message missing is not always happening but should happen once
out of ~30 consecutive trials (i.e. problem happened at least once when I
repeated the test 30 times consecutively, by using TestNG's
"invocationCount=30" attribute, for example).

It would be really helpful if someone can help reproduce this as well so
that I can file a bug.

Regards,

Jaewoong


tabish...@gmail.com wrote
> On 03/26/2013 08:49 PM, Jaewoong Choi wrote:
>> Unfortunately, I couldn't verify if the latest snapshots resolved the
>> issue I
>> questioned.  I failed to replace the activemq-core dependency from 5.7.0
>> to
>> any upper versions as I ended up facing some runtime errors with the API
>> I've used with 5.7.0.  It looks like, including "broker/client split"
>> that
>> you mentioned, from 5.8.0 the activemq is not that backward compatible
>> with
>> 5.7.0 and below versions.
> 
> You probably didn't include the activemq-kahadb-store jar there's also 
> the activemq-all uber module which will bring in everything.
> 
> 
> -- 
> Tim Bish
> Sr Software Engineer | RedHat Inc.

> tim.bish@

>  | www.fusesource.com | www.redhat.com
> skype: tabish121 | twitter: @tabish121
> blog: http://timbish.blogspot.com/





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/persistent-message-missing-to-a-durable-subscriber-when-it-reconnects-restarts-tp4665130p4665173.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to