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

[LTS] FQQN anycast destinations breaks message distribution

XMLWordPrintable

    • False
    • None
    • False
    • +
    • Hide

      Deploy a simple cluster on OCP as per CR:

      apiVersion: broker.amq.io/v2alpha5
      kind: ActiveMQArtemis
      metadata:
        name: ex-aao
        application: ex-aao-app
        namespace: amq-broker-test
      spec:
        acceptors:
          - expose: true
            name: acceptor-one
            port: 61626
            protocols: all
        deploymentPlan:
          image: placeholder
          size: 2
          requireLogin: false
          persistenceEnabled: false
          journalType: nio
          messageMigration: false
          jolokiaAgentEnabled: false
          managementRBACEnabled: true 

      and a user defined Address as per CR:

      apiVersion: broker.amq.io/v2alpha3
      kind: ActiveMQArtemisAddress
      metadata:
        generation: 1
        name: ex-aaoaddress
        namespace: amq-broker-test
      spec:
        addressName: myAddress1
        applyToCrNames:
          - ex-aao
        queueName: myQueue1
        routingType: anycast 

      Start a producer connected to pod 0 and send a bunch of messages

      /opt/amq/bin/artemis producer --sleep 500 --threads 1 --txt-size 0 --message 'Hello World' --message-count 20 --destination 'myAddress1::myQueue1' --url 'tcp://POD_0_IP:PORT' --verbose 

      Start a consumer connected to pod 1

      /opt/amq/bin/artemis consumer --threads 1 --txt-size 0 --message-count 10 --destination 'myAddress1::myQueue1' --url 'tcp://POD_1_IP:PORT'--verbose 

      Result:

      No message is consumed, but message redistribution where expected to kick in.

      Now, connecting a consumer to pod 0

      /opt/amq/bin/artemis consumer --threads 1 --txt-size 0 --message-count 10 --destination 'myAddress1::myQueue1' --url 'tcp://POD_0_IP:PORT'--verbose  

      The messages already on queue get consumed.

      All messages sent afterwards are consumed from pod 0.
      Balancing does not work and no message is routed to the consumer on pod 1

       

      Adding an anycast prefix on broker configuration

      apiVersion: broker.amq.io/v2alpha5
      [...]
      spec:
        acceptors:
          - anycastPrefix: jms.queue.
      [...]

      and on producer side

      /opt/amq/bin/artemis producer --sleep 500 --threads 1 --txt-size 0 --message 'Hello World' --message-count 20 --destination 'jms.queue.myAddress1::myQueue1' --url 'tcp://POD_0_IP:PORT' --verbose 

      seems a workaround for the balancing issue, but no for the redistribution one.

      Show
      Deploy a simple cluster on OCP as per CR: apiVersion: broker.amq.io/v2alpha5 kind: ActiveMQArtemis metadata:   name: ex-aao   application: ex-aao-app   namespace: amq-broker-test spec:   acceptors:     - expose: true       name: acceptor-one       port: 61626       protocols: all   deploymentPlan:     image: placeholder     size: 2     requireLogin: false     persistenceEnabled: false     journalType: nio     messageMigration: false     jolokiaAgentEnabled: false     managementRBACEnabled: true and a user defined Address as per CR: apiVersion: broker.amq.io/v2alpha3 kind: ActiveMQArtemisAddress metadata:   generation: 1   name: ex-aaoaddress   namespace: amq-broker-test spec:   addressName: myAddress1   applyToCrNames:     - ex-aao   queueName: myQueue1   routingType: anycast Start a producer connected to pod 0 and send a bunch of messages /opt/amq/bin/artemis producer --sleep 500 --threads 1 --txt-size 0 --message 'Hello World' --message-count 20 --destination 'myAddress1::myQueue1' --url 'tcp: //POD_0_IP:PORT' --verbose Start a consumer connected to pod 1 /opt/amq/bin/artemis consumer --threads 1 --txt-size 0 --message-count 10 --destination 'myAddress1::myQueue1' --url 'tcp: //POD_1_IP:PORT' --verbose Result: No message is consumed, but message redistribution where expected to kick in. Now, connecting a consumer to pod 0 /opt/amq/bin/artemis consumer --threads 1 --txt-size 0 --message-count 10 --destination 'myAddress1::myQueue1' --url 'tcp: //POD_0_IP:PORT' --verbose The messages already on queue get consumed. All messages sent afterwards are consumed from pod 0. Balancing does not work and no message is routed to the consumer on pod 1   Adding an anycast prefix on broker configuration apiVersion: broker.amq.io/v2alpha5 [...] spec:   acceptors:     - anycastPrefix: jms.queue. [...] and on producer side /opt/amq/bin/artemis producer --sleep 500 --threads 1 --txt-size 0 --message 'Hello World' --message-count 20 --destination 'jms.queue.myAddress1::myQueue1' --url 'tcp: //POD_0_IP:PORT' --verbose seems a workaround for the balancing issue, but no for the redistribution one.

      Neither message redistribution nor balancing work using FQQN destinations with different names for Address and Queues (myAddress1::myQueue1)

      Furthermore mixing up FQQN with anycast prefix (e.g. jms.queue.myAddress1::myQueue1) makes balancing work, but message redistribution still won't happen.

            rhn-support-jbertram Justin Bertram
            pmarcon@redhat.com Paolo Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: