You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Danielius Jurna <da...@elitnet.lt> on 2006/04/26 16:03:07 UTC

Message redelivery using Stomp with RC2 and RC3

While using Stomp protocol, it seems that messages are not deleted from the
queue right after message delivery. In RC2 brokers debug log you can find
messages "Journalled message add ..." after posting messages. Then stomp
client receives messages. If Stomp client quits right after receiving
messages, messages are left in the queue. Stomp client must stay connected
for at least several seconds for messages to be removed from queue.
Is this behaviour normal?

Even more, in RC3 messages are NEVER removed from the queue!!

Seems like some bugs in Stomp protocol.

How mature is OpenWire c++ client?
--
View this message in context: http://www.nabble.com/Message-redelivery-using-Stomp-with-RC2-and-RC3-t1511957.html#a4101868
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Message redelivery using Stomp with RC2 and RC3

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Unfortunate, this is caused by a small implementation defect in the
stomp client when using auto ack.  If you manually ack messages from
your client then this goes away.

The details of the problem is that we simulate autoack on the server
side.  With autoack, the client never has to send the server an ack
message.  So when the server receives a message to send to the client,
it gives it to the sever side stomp connector to deliver to the client
and that stomp connector is the one the acks the message.  That ack
goes into a pending list that the read thread for the connector checks
before every socket read.  The problem is that the read thread may be
blocked on a read for a while before it checks that pending list, so
acks are just stacking up.

I think the right fix for this would be to have the reader thread
block waiting for messages on pending list and start and async thread
to read from the socket if not messages are pending.  The async thread
would take a read command and put it on the pending list.  Anybody
have free time to implement this?

Regards,
Hiram

On 4/27/06, Danielius Jurna <da...@elitnet.lt> wrote:
>
> Yes, in latest snapshot messages are deleted, but I don't think this issue is
> solved completly.
>
> If I'm consuming message with java client, message is deleted from journal
> right after it is sent to the consumer. So journal log looks like:
> Journalled message add
> Journalled message remove
> Journalled message add
> Journalled message remove
>
> If I'm consuming message with stomp client, message is deleted from jounal
> only after some delay. So log looks like:
> Journalled message add
> Journalled message add
> ---- few seconds of waiting
> Journalled message remove
> Journalled message remove
>
> This behaviour causes few problems:
> 1. If Stomp client quits after receiving messages (even after 1-2s after
> receiving message), messages are still left in the journal. After reconnect,
> all those messages are redelivered again.
> 2. If broker runs at full capacity (sender sends as much as broker can
> handle and receiver receives as much as it can), memory consumpsion is
> increasing and after about 1M messages borker crashes. If you add some delay
> in message producer (in my case - adding 100ms sleep) - memory stops
> increasing.
> --
> View this message in context: http://www.nabble.com/Message-redelivery-using-Stomp-with-RC2-and-RC3-t1511957.html#a4115647
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Message redelivery using Stomp with RC2 and RC3

Posted by Danielius Jurna <da...@elitnet.lt>.
Yes, in latest snapshot messages are deleted, but I don't think this issue is
solved completly.

If I'm consuming message with java client, message is deleted from journal
right after it is sent to the consumer. So journal log looks like:
Journalled message add
Journalled message remove
Journalled message add
Journalled message remove

If I'm consuming message with stomp client, message is deleted from jounal
only after some delay. So log looks like:
Journalled message add
Journalled message add
---- few seconds of waiting
Journalled message remove
Journalled message remove

This behaviour causes few problems:
1. If Stomp client quits after receiving messages (even after 1-2s after
receiving message), messages are still left in the journal. After reconnect,
all those messages are redelivered again.
2. If broker runs at full capacity (sender sends as much as broker can
handle and receiver receives as much as it can), memory consumpsion is
increasing and after about 1M messages borker crashes. If you add some delay
in message producer (in my case - adding 100ms sleep) - memory stops
increasing.
--
View this message in context: http://www.nabble.com/Message-redelivery-using-Stomp-with-RC2-and-RC3-t1511957.html#a4115647
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Message redelivery using Stomp with RC2 and RC3

Posted by Hiram Chirino <hi...@hiramchirino.com>.
I just recently fixed that issue.  Should be in the latest SNAPSHOT release.

On 4/26/06, Danielius Jurna <da...@elitnet.lt> wrote:
>
> While using Stomp protocol, it seems that messages are not deleted from the
> queue right after message delivery. In RC2 brokers debug log you can find
> messages "Journalled message add ..." after posting messages. Then stomp
> client receives messages. If Stomp client quits right after receiving
> messages, messages are left in the queue. Stomp client must stay connected
> for at least several seconds for messages to be removed from queue.
> Is this behaviour normal?
>
> Even more, in RC3 messages are NEVER removed from the queue!!
>
> Seems like some bugs in Stomp protocol.
>
> How mature is OpenWire c++ client?
> --
> View this message in context: http://www.nabble.com/Message-redelivery-using-Stomp-with-RC2-and-RC3-t1511957.html#a4101868
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram