Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2368

Fix races on closing consumer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.10.0
    • Broker
    • None

    Description

      There are some race conditions between closing consumer and session failover:

      1. When sending SessionConsumerCloseMessage timeout, conn::fail() is called resulting in current consumer is recreated on server side again but removed on client side.
      2. Between  SessionConsumerCloseMessage sending and session::removeConsume(), session failover happens resulting in consumer inconsistency.
      3. 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

          Activity

            People

              Unassigned Unassigned
              wy96f Wei Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m