Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-8034

Artemis default multicast routing creates a problem when producing and consuming in the same session

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Undefined
    • None
    • AMQ 7.10.2.GA
    • amqp-protocol
    • None
    • False
    • None
    • False
    • Important

    Description

      Steps to reproduce:

      1. Unpack the attached `amqpconsume.zip`
      2. `mvn package`
      3. Start a broker with a clean message store and default configuration
      4. Edit `App.java` to change broker host, port, credentials, etc., if required
      5. Run `java -jar target amqpconsume-0.0.1-jar-with-dependencies.jar`
      6. Note that no message is consumed, even though one is clearly sent.

      The test application creates a queue producer and a consumer in the same session. The producer sends messages, then the consumer receives them. If the consumer calls `receive(timeout)` then it will sometimes return `null`, however long the timeout. If it calls `receive()` it will sometimes block, even though the producer just sent a message.

      I believe that this problem arises because, when the message is sent, the broker does not know that anycast (queue) semantics are needed. If the broker processes the incoming messages before the consumer is set up, it will assume anycast (topic) semantics, and discard the message because there are no consumers on the topic.

      The problem is not 100% reproducible, and seems to depend on subtle timing variations between test runs and environments.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: