activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Losing Messages With a Durable Subscriber
Date Fri, 07 Apr 2006 11:47:38 GMT
Which version of ActiveMQ 4 are you using? (4.x has been around for
about a year now :)

Have you tried using 4.0-RC2 which has lots of bug fixes


On 4/7/06, Neil. <> wrote:
> Hi,
> I'm trying to test a fairly simple JMS publish/subscribe application using
> ActiveMQ 4 with the in-built DerbyDB for queue persistence.
> I'm firing up a broker and then starting three subscribers, each listening
> to a different topic.
> Next I launch a test program that publishes 3 messages, one to each topic.
> This works fine and the messages are being received. If I then run the test
> program again, the messages are again found and successfully processed.
> The problem seems to occur if I launch multiple instances of the test
> program at the same time, meaning there are several messages on each topic
> at once.  At this point I'm getting some really weird behaviour.  The first
> few messages are picked up, but then the consumers start to report that they
> aren't finding any messages.
> Stopping and restarting the broker means that more messages will be picked
> up before the consumers again say that they can't find any messages.
> Repeating this process a few times will eventually get all of the messages,
> but that probably won't work too well in a production set up!
> There doesn't seem to be any pattern to which messages it's finding;
> sometimes it will get all of the topic 1 messages, one of the topic 2
> messages, none of the topic 3 messages... Next time through it will be a
> different combination.  The only consistent thing seems to be that it never
> finds all of the messages.
> If I switch to using session.createConsumer() instead of
> session.createDurableSubscriber then everything works fine. Unfortunately I
> need the level of resilience provided by persistent messages, so I need to
> find a way around this.
> Has anybody come across this sort of problem before or are there any silly
> mistakes I could be making here?  Any advice would be most welcome, as I'm
> pulling my hair out in great clumps a t the moment!
> Thanks,
> Neil
> --
> View this message in context:
> Sent from the ActiveMQ - Dev forum at



View raw message