Description
There are some race conditions between closing consumer and session failover:
- When sending SessionConsumerCloseMessage timeout, conn::fail() is called resulting in current consumer is recreated on server side again but removed on client side.
- Between SessionConsumerCloseMessage sending and session::removeConsume(), session failover happens resulting in consumer inconsistency.
- When an iteration over the consumers entrySet is made to recreate consumer during session failover process, consumer::close() is called, maybe leading to consumer inconsistency or ConcurrentModificationException thrown.
We traverse through the cloned consumers entrySet, add synchronized block and check if consumer is closed while recreating consumer to fix the issue.
Attachments
Issue Links
- links to