activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: Bug in failover transport
Date Fri, 10 Nov 2006 19:54:00 GMT
This is tricky bug, but it might be normal.  It gets a little
complicated, but let me try to explain what I think is happening:

 (1) Say broker sends messages A,B,C,D to client
  (2) Client acks message A and B
  (3) Connection failure occurs while ack B is being delivered to broker
 (4) Connection is 'recovered'
       (4.1) If the clients previous connection is still connected to
the broker (client reconnect quicker than broker can detect client
failure), then the broker forcibly disconnects the previous
connection.  This cause all previous subscriptions to be destroyed.
       (4.2) Client replays all connection state including open
subscriptions to the broker
       (4.3) Client resends the ack that was in flight when the
failure occurred.
       (4.4) Since broker has not sent the new subscription any
messages yet, it does not match anything sent to the client and we get
the "Invalid acknowledgment" message.
       (4.5) Broker re-sends message B,C,D to client

Now in the scenario above the worst case is that B is delivered 2
times.  But since 4.5 and 4.4 occur concurrently there could be some
subtle bugs in the code that need a closer look.

Anyways.. I hope this help shed some light into the issue.




On 11/10/06, Danielius Jurna <danielius@elitnet.lt> wrote:
>
> No. I don't have network of brokers. And error log in the broker shows, that
> client sends ack to correct broker, which cannot correlate ACK. It's very
> easy to reproduce this bug. I've made a test case, which you can find in the
> jira issue mentioned in the first message.
>
>
> yaussy wrote:
> >
> > If you have a network of brokers, does this problem happen if the consumer
> > fails over to another, running, broker?
> >
>
> --
> View this message in context: http://www.nabble.com/Bug-in-failover-transport-tf2587218.html#a7271859
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Mime
View raw message