Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5266

Stuck Messages in Single Broker when using JDBC Persistent Store

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      With multiple concurrent producer transactions and active fast consumers it is possible to get out of order db insertions and scans resulting in a skipped dispatch. This scenario is exacerbated when the cursor cache is disabled because every dispatch will potentially result in a scan.
      the JDBC store maps jms transaction to jdbc connection transactions at the point of a commit and these can occur in parallel. The broker tracks a sequenceId to ensure ordering relative to a jms connection and scans respect that order but there is currently nothing to stop a scan seeing a later sequence before an earlier sequence is stored. In other words, inserts can race, but the reader needs to limit a read to the lowest outstanding sequence.

      On a restart, any stuck messages will be replayed correctly, because the cursor transient state w.r.t to the last sequence id read will be reset.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment