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

filter not applied to all brokers in cluster

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide

      restart the broker

      Show
      restart the broker
    • Hide

      I reproduced the issue using both ActiveMQArtemis address and brokerProperties.

      If I deploy cr [1] then I forward the brokers ports locally :

      oc port-forward svc/ex-aao-my-acceptor-0-svc 44175:61626
      oc port-forward svc/ex-aao-my-acceptor-1-svc 44176:61626 

      then I started a publisher on the topic, and I can see that the messages are flowing in the multicast queue created.

      So I apply a filter on the broker by applying the following modification to the custom resource :

          - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.filterString=color = 'red'" 

      and wait for the filter to appear on both nodes of the cluster.

      After that, I can see that the first node stops receiving messages on the queue with filters on the first node.

      |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE|
      |08823fef-feb1-4666-b57...|exampleTopic             |1             |84           |84            |84              |0             |0              |MULTICAST   |
      |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |activemq.management.b2...|activemq.management.b2...|1             |0            |0             |0               |0             |0              |MULTICAST   |
      |queuewithfilter          |exampleTopic             |0             |73           |73            |0               |0             |0              |MULTICAST   |
      sh-4.4$ 

      but I can see that the second node started to receive the messages.

      sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616
      Connection brokerURL = tcp://ex-aao-ss-1.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616
      |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE|
      |72879c97-72a5-4e23-8a0...|exampleTopic             |1             |99           |99            |99              |0             |0              |MULTICAST   |
      |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |activemq.management.8d...|activemq.management.8d...|1             |0            |0             |0               |0             |0              |MULTICAST   |
      |queuewithfilter          |exampleTopic             |0             |26           |26            |0               |0             |0              |MULTICAST   | 

      During my tests I also try to restart the second broker (where the publisher is not connected) I can see that the messages are not flowing anymore in the queue with the filter on both brokers [2].

      [1]

      kind: ActiveMQArtemis
      apiVersion: broker.amq.io/v1beta1
      metadata:
        application: ex-aao-app
        name: ex-aao
        namespace: test-broker
      spec:
        brokerProperties:
          - "addressConfigurations.exampleTopic.routingTypes=MULTICAST"
          - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.address=exampleTopic"
          - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.routingType=MULTICAST"
        acceptors:
          - bindToAllInterfaces: true
            name: my-acceptor
        console:
          expose: true
        deploymentPlan:
          image: placeholder
          jolokiaAgentEnabled: false
          journalType: nio
          managementRBACEnabled: true
          messageMigration: false
          persistenceEnabled: false
          requireLogin: false
          size: 2 

      [2]

      sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616
      Connection brokerURL = tcp://ex-aao-ss-0.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616
      |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE|
      |4f69b20f-8441-4843-8e5...|exampleTopic             |1             |22           |22            |22              |0             |0              |MULTICAST   |
      |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |activemq.management.ef...|activemq.management.ef...|1             |0            |0             |0               |0             |0              |MULTICAST   |
      |queuewithfilter          |exampleTopic             |0             |73           |73            |0               |0             |0              |MULTICAST   |
      sh-4.4$ 
      sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616
      Connection brokerURL = tcp://ex-aao-ss-1.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616
      |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE|
      |35833aea-a9e5-461a-a81...|exampleTopic             |1             |13           |13            |13              |0             |0              |MULTICAST   |
      |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     |
      |activemq.management.29...|activemq.management.29...|1             |0            |0             |0               |0             |0              |MULTICAST   |
      |queuewithfilter          |exampleTopic             |0             |0            |0             |0               |0             |0              |MULTICAST   | 

       

      Show
      I reproduced the issue using both ActiveMQArtemis address and brokerProperties. If I deploy cr [1] then I forward the brokers ports locally : oc port-forward svc/ex-aao-my-acceptor-0-svc 44175:61626 oc port-forward svc/ex-aao-my-acceptor-1-svc 44176:61626 then I started a publisher on the topic, and I can see that the messages are flowing in the multicast queue created. So I apply a filter on the broker by applying the following modification to the custom resource :   - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.filterString=color = 'red'" and wait for the filter to appear on both nodes of the cluster. After that, I can see that the first node stops receiving messages on the queue with filters on the first node. |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE| |08823fef-feb1-4666-b57...|exampleTopic             |1             |84           |84            |84              |0             |0              |MULTICAST   | |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     | |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     | |activemq.management.b2...|activemq.management.b2...|1             |0            |0             |0               |0             |0              |MULTICAST   | |queuewithfilter          |exampleTopic             |0             |73           |73            |0               |0             |0              |MULTICAST   | sh-4.4$ but I can see that the second node started to receive the messages. sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616 Connection brokerURL = tcp://ex-aao-ss-1.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616 |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE| |72879c97-72a5-4e23-8a0...|exampleTopic             |1             |99           |99            |99              |0             |0              |MULTICAST   | |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     | |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     | |activemq.management.8d...|activemq.management.8d...|1             |0            |0             |0               |0             |0              |MULTICAST   | |queuewithfilter          |exampleTopic             |0             |26           |26            |0               |0             |0              |MULTICAST   | During my tests I also try to restart the second broker (where the publisher is not connected) I can see that the messages are not flowing anymore in the queue with the filter on both brokers [2] . [1] kind: ActiveMQArtemis apiVersion: broker.amq.io/v1beta1 metadata:   application: ex-aao-app   name: ex-aao   namespace: test-broker spec:   brokerProperties:     - "addressConfigurations.exampleTopic.routingTypes=MULTICAST"     - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.address=exampleTopic"     - "addressConfigurations.exampleTopic.queueConfigs.queuewithfilter.routingType=MULTICAST"   acceptors:     - bindToAllInterfaces: true       name: my-acceptor   console:     expose: true   deploymentPlan:     image: placeholder     jolokiaAgentEnabled: false     journalType: nio     managementRBACEnabled: true     messageMigration: false     persistenceEnabled: false     requireLogin: false     size: 2 [2] sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616 Connection brokerURL = tcp://ex-aao-ss-0.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616 |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE| |4f69b20f-8441-4843-8e5...|exampleTopic             |1             |22           |22            |22              |0             |0              |MULTICAST   | |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     | |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     | |activemq.management.ef...|activemq.management.ef...|1             |0            |0             |0               |0             |0              |MULTICAST   | |queuewithfilter          |exampleTopic             |0             |73           |73            |0               |0             |0              |MULTICAST   | sh-4.4$  sh-4.4$ ./amq-broker/bin/artemis queue stat --url tcp://$(hostname --fqdn):61616 Connection brokerURL = tcp://ex-aao-ss-1.ex-aao-hdls-svc.test-broker.svc.cluster.local:61616 |NAME                     |ADDRESS                  |CONSUMER_COUNT|MESSAGE_COUNT|MESSAGES_ADDED|DELIVERING_COUNT|MESSAGES_ACKED|SCHEDULED_COUNT|ROUTING_TYPE| |35833aea-a9e5-461a-a81...|exampleTopic             |1             |13           |13            |13              |0             |0              |MULTICAST   | |DLQ                      |DLQ                      |0             |0            |0             |0               |0             |0              |ANYCAST     | |ExpiryQueue              |ExpiryQueue              |0             |0            |0             |0               |0             |0              |ANYCAST     | |activemq.management.29...|activemq.management.29...|1             |0            |0             |0               |0             |0              |MULTICAST   | |queuewithfilter          |exampleTopic             |0             |0            |0             |0               |0             |0              |MULTICAST   |  

    Description

      I have a customer that using AMQ Broker deployed with AMQ Operator 7.11.1. They mention that when they apply a filter on a multicast queue seems that the filter is not applied for the broker where the producer is not connected and the only way to have the filter applied is to restart the broker.

      Attachments

        Activity

          People

            gaohoward Howard Gao
            rhn-support-mgolfari Matteo Golfarini (Inactive)
            Mikhail Krutov Mikhail Krutov
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: