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

Auto-deleted queue with active producer leaves producer disabled (or impotent)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.26.0
    • 2.27.1, 2.28.0
    • None
    • None

    Description

      DISCLAIMER: this bug happens sometimes and then goes away, even using the simple test case I've attached.  I would love to know why or how it comes and goes, but I just don't know.  It has been happening for weeks, I was able to reproduce this morning using the attached project and procedure, and now ... everything works just fine.  I'm pretty sure this isn't a false alarm, because we tracked down bugs in our software to this phenomenon, and everything got better when we disabled auto-delete of our queues.  Anyway, here goes:

      UPDATE: I figured out exactly what is the right sequence to reproduce.

      Configure Artemis to auto-delete queues.

      • there is a queue producer and queue consumer running in different processes
      • the producer sends a few messages, and the consumer drains the queue
      • quit the consumer process
      • enough time elapses that Artemis auto-deletes the queue
      • send a few messages from the producer
      • start the consumer process

      Expected: queue is re-created and consumer is delivered messages when it starts

      Actual: producer send() fails silently, queue is not re-created, consumer sees no messages

      To reproduce, build the attached maven project in scratch.zip.  The version of java doesn't seem to matter - at least, Java 8 and 17 are the same.

      In separate consoles run

      java -cp target/scratch-10.0.1-SNAPSHOT-shaded.jar net.redpoint.test.TestSend

      java -cp target/scratch-10.0.1-SNAPSHOT-shaded.jar net.redpoint.test.TestConsume

      You will see something like

      Hit enter on the sending console, and it will send a message (or two, on Windows)

      Ctrl-C to kill the consumer but leave the producer running

      Bring up the Artemis console and browse queues

      Wait just long enough for the Artemis console to show that "myqueue" has been auto-deleted

      (or wait until the artemis command-line window logs that the queue was deleted)

      Hit Enter on the producer window.  It will send a message.

      But.. the queue is not recreated, and the send() fails silently.

      Start the consumer again.  It does not receive any messages.

       

      Attachments

        1. scratch.zip
          9 kB
          john lilley
        2. image-2022-11-09-14-40-30-793.png
          11 kB
          john lilley
        3. image-2022-11-09-14-36-41-631.png
          16 kB
          john lilley
        4. image-2022-11-09-14-36-13-274.png
          16 kB
          john lilley
        5. image-2022-11-09-14-35-52-506.png
          16 kB
          john lilley
        6. image-2022-11-09-14-33-54-881.png
          22 kB
          john lilley
        7. image-2022-11-09-14-33-14-216.png
          20 kB
          john lilley

        Issue Links

          Activity

            People

              clebertsuconic Clebert Suconic
              john.lilley@redpoint.net john lilley
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 10m
                  10m