Qpid
  1. Qpid
  2. QPID-2117

Dispatcher's stop logic can cause mis-processing of messages.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: M3, M4, 0.5
    • Fix Version/s: JIRA Cleanup
    • Component/s: Java Client
    • Labels:
      None

      Description

      Currently the logic for the Dispatcher can be simplified as follows:

      while (msg =_queue.take() != null)
      Stop if required
      Process Message

      There are a couple of problems, the first is that if the _queue is not empty when the stop request is made then the dispatcher will remove a message from _queue and sit in the Stop until it is restarted, where it will then process the message.

      The second issue is that if the queue is empty when the stop is requested then nothing happens... until a message is received and the dispatcher then removes it and holds it in the Stop.

      Finally. there is no way to stop the dispatcher once it has made the take() call, other than via an interrupt() call.

      Changes to the dispatcher should be done to allow it to be stopped and started with validation i.e. thread A calls dispatcher.stop() and that does not return until the dispatcher has stopped. Currently it is a request that is never confirmed.

      In providing this functionality we will be able to avoid the interrupt() call that has already been identified as in need of addressing see QPID-1515.

        Activity

        Robbie Gemmell made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Later [ 7 ]
        Hide
        Robbie Gemmell added a comment -

        Closing issue out as part of JIRA cleanup. Issue may already be resolved, may be invalid, or may never be fixed. See QPID-3469 for further details.

        Show
        Robbie Gemmell added a comment - Closing issue out as part of JIRA cleanup. Issue may already be resolved, may be invalid, or may never be fixed. See QPID-3469 for further details.
        Robbie Gemmell made changes -
        Field Original Value New Value
        Fix Version/s JIRA Cleanup [ 12317862 ]
        Martin Ritchie created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Martin Ritchie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development