You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by PieterN <se...@internethoofdkantoor.nl> on 2007/09/11 12:57:23 UTC

Duplicate (persistant) messages with durable subscriptions

Hi all,

I have encountered a very strange problem. I have two consumers, having a
durable subscription on a topic. If I send a persistent message to the
topic, everything works ok. However, when I restart the consumers, one of
them receives the message again after connecting (it seems to be the one
that ACK's the message as second). Reconnecting again doesn't give any
problems, the messages aren't redelivered.

This problem does not happen when only a single consumer is connected. Also,
it doesn't appear if the persistent message is sent before the consumers are
connected. 

Any clues on this? It may be related to #AMQ-1195, but the behaviour I see
is a bit different.

Thanks.

Regards,

Pieter
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12612199
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by kmoore4now <ke...@jkmoore.net>.
I'm experiencing the same or a very similar problem, although it is on
version 4.1.1, oddly enough.

In my case the broker sends messages to a durable topic with two consumers.
They both receive the message just fine.

If I then re-start the broker while leaving the clients running, the second
client to re-establish the connection gets the messages again.

I'm using journaledJDBC persistence.
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12885655
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by kmoore4now <ke...@jkmoore.net>.
I'm experiencing the same or a very similar problem, although it is on
version 4.1.1, oddly enough.

In my case the broker sends messages to a durable topic with two consumers.
They both receive the message just fine.

If I then re-start the broker while leaving the clients running, the second
client to re-establish the connection gets the messages again.

I'm using journaledJDBC persistence.
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12885667
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by PieterN <se...@internethoofdkantoor.nl>.

PieterN wrote:
> 
> [snip]
> 
To reproduce the problem:

Start two consumers with a durable topic subscription (in the example/
directory):

$ ant consumer -Ddurable=true -DclientId=test1 -Dtopic=true
$ ant consumer -Ddurable=true -DclientId=test2 -Dtopic=true

Send persistent messages to this topic:

$ ant producer -Ddurable=true -Dtopic=true

Kill consumers and start them again. One of them willl receive each message
again. Is this a known problem, or should I file a JIRA? As said before, it
works fine in ActiveMQ 4.1.1, but not in later snapshots. I don't really
want to go back to 4.1.1, because it has other issues with STOMP, plus I
want to use the web interface.

Cheers,

Pieter
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12631789
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by kmoore4now <ke...@jkmoore.net>.
I'm experiencing the same or a very similar problem, although it is on
version 4.1.1, oddly enough.

In my case the broker sends messages to a durable topic with two consumers.
They both receive the message just fine.

If I then re-start the broker while leaving the clients running, the second
client to re-establish the connection gets the messages again.

I'm using journaledJDBC persistence.
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12885663
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by kmoore4now <ke...@jkmoore.net>.
I'm experiencing the same or a very similar problem, although it is on
version 4.1.1, oddly enough.

In my case the broker sends messages to a durable topic with two consumers.
They both receive the message just fine.

If I then re-start the broker while leaving the clients running, the second
client to re-establish the connection gets the messages again.

I'm using journaledJDBC persistence.
-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12885661
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Duplicate (persistant) messages with durable subscriptions

Posted by PieterN <se...@internethoofdkantoor.nl>.
FYI, I checked with ActiveMQ 4.1.1, there it works as expected. With 4.2 and
5.0 snapshots however I get the problem described in my previous e-mail.

Regards,

Pieter


PieterN wrote:
> 
> Hi all,
> 
> I have encountered a very strange problem. I have two consumers, having a
> durable subscription on a topic. If I send a persistent message to the
> topic, everything works ok. However, when I restart the consumers, one of
> them receives the message again after connecting (it seems to be the one
> that ACK's the message as second). Reconnecting again doesn't give any
> problems, the messages aren't redelivered.
> 
> This problem does not happen when only a single consumer is connected.
> Also, it doesn't appear if the persistent message is sent before the
> consumers are connected. 
> 
> Any clues on this? It may be related to #AMQ-1195, but the behaviour I see
> is a bit different.
> 
> Thanks.
> 
> Regards,
> 
> Pieter
> 

-- 
View this message in context: http://www.nabble.com/Duplicate-%28persistant%29-messages-with-durable-subscriptions-tf4421775s2354.html#a12616027
Sent from the ActiveMQ - User mailing list archive at Nabble.com.