Uploaded image for project: 'HornetQ'
  1. HornetQ
  2. HORNETQ-1260

HornetQ can drop messages if a connection is stopped before Consumer::receive() is called

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0.Beta2
    • Fix Version/s: None
    • Component/s: JMS
    • Labels:
      None

      Description

      I have attached a test that fails intermittently for myself using the latest master of WildFly which contains the 2.4.0.Beta2 version of HornetQ.

      You must have a queue called: BTR_TestOne

      You may need to have some setting on the InVm connection factory, I have include my HQ config in case it is pertinent.

      Run the attached Arquillian test, it should fail because the second message is not received.

      If I change the "receive()" to a "receive(20000)" (and disable the thread that calls close on the connection), then after 20000, the receive does indeed return with the message. With a "receive()" I only occasionally receive the message. If I do not call stop/start on the connection I always receive the message.

      I have worked around this in my own project by not calling start before I call "receive()" but it could affect others.

      To summarise, there seems to be a problem calling:

      connection.stop();
      receive();
      // Second thread calls connection.start()

      Hope that helps,
      Tom

        Gliffy Diagrams

          Attachments

          1. hqconfig.xml
            6 kB
          2. test.tgz
            10 kB

            Issue Links

              Activity

                People

                • Assignee:
                  clebert.suconic Clebert Suconic
                  Reporter:
                  tomjenkinson Thomas Jenkinson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: