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

Cluster Connection Blocks on Large Messages OOTB for Producer Credits

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      Setting the producer-window-size on the cluster connection seems to avoid the issue.

      Show
      Setting the producer-window-size on the cluster connection seems to avoid the issue.
    • Hide

      1. Create a clustered broker:

      export AMQ_PASS=admin
      $AMQ_HOME/bin/artemis create \
        --force \
        --port-offset 0 \
        --clustered \
        --cluster-user cluster-admin \
        --cluster-password cluster-secret \
        --staticCluster "tcp://localhost:61716" \
        --max-hops 1 \
        --host localhost \
        --name broker-0 \
        --user $AMQ_USER --password $AMQ_PASS \
        --require-login \
        --role amq \
        --no-hornetq-acceptor \
        --no-mqtt-acceptor \
        --no-stomp-acceptor \
        $AMQ_CLUSTER1
      
      $AMQ_HOME/bin/artemis create \
        --force \
        --port-offset 100 \
        --clustered \
        --cluster-user cluster-admin \
        --cluster-password cluster-secret \
        --staticCluster "tcp://localhost:61616" \
        --max-hops 1 \
        --host localhost \
        --name broker-1 \
        --user $AMQ_USER --password $AMQ_PASS \
        --require-login \
        --role amq \
        --no-hornetq-acceptor \
        --no-mqtt-acceptor \
        --no-stomp-acceptor \
        $AMQ_CLUSTER2
      

      2. Start the brokers and verify the cluster is formed

      3. Start a consumer on the second node of the cluster:

      ./artemis consumer --url 'tcp://localhost:61716' --user admin --password admin --message-count 2 --protocol core --destination queue://q1 --verbose
      

      4. Start a producer on the first node of the cluster and send 2 large messages:

      ./artemis producer --url 'tcp://localhost:61616' --user admin --password admin --message-count 2 --message-size 2048000 --protocol core --destination queue://q1 --verbose
      

      5. The consumer receives one message and blocks indefinitely waiting for the second:

      Connection brokerURL = tcp://192.168.122.102:61616
      Consumer:: filter = null
      Consumer ActiveMQQueue[q1], thread=0 wait until 2 messages are consumed
      Consumer ActiveMQQueue[q1], thread=0 Received ID:f03ef187-1023-11ed-b562-5254006c6af5
      JMS Message ID:ID:f03ef187-1023-11ed-b562-5254006c6af5
      (blocks here)
      

      A heap examination of the ClusterConnectionBridge on node1 reveals it is blocked on flow control.

      Show
      1. Create a clustered broker: export AMQ_PASS=admin $AMQ_HOME/bin/artemis create \ --force \ --port-offset 0 \ --clustered \ --cluster-user cluster-admin \ --cluster-password cluster-secret \ --staticCluster "tcp: //localhost:61716" \ --max-hops 1 \ --host localhost \ --name broker-0 \ --user $AMQ_USER --password $AMQ_PASS \ --require-login \ --role amq \ --no-hornetq-acceptor \ --no-mqtt-acceptor \ --no-stomp-acceptor \ $AMQ_CLUSTER1 $AMQ_HOME/bin/artemis create \ --force \ --port-offset 100 \ --clustered \ --cluster-user cluster-admin \ --cluster-password cluster-secret \ --staticCluster "tcp: //localhost:61616" \ --max-hops 1 \ --host localhost \ --name broker-1 \ --user $AMQ_USER --password $AMQ_PASS \ --require-login \ --role amq \ --no-hornetq-acceptor \ --no-mqtt-acceptor \ --no-stomp-acceptor \ $AMQ_CLUSTER2 2. Start the brokers and verify the cluster is formed 3. Start a consumer on the second node of the cluster: ./artemis consumer --url 'tcp: //localhost:61716' --user admin --password admin --message-count 2 --protocol core --destination queue://q1 --verbose 4. Start a producer on the first node of the cluster and send 2 large messages: ./artemis producer --url 'tcp: //localhost:61616' --user admin --password admin --message-count 2 --message-size 2048000 --protocol core --destination queue://q1 --verbose 5. The consumer receives one message and blocks indefinitely waiting for the second: Connection brokerURL = tcp: //192.168.122.102:61616 Consumer:: filter = null Consumer ActiveMQQueue[q1], thread=0 wait until 2 messages are consumed Consumer ActiveMQQueue[q1], thread=0 Received ID:f03ef187-1023-11ed-b562-5254006c6af5 JMS Message ID:ID:f03ef187-1023-11ed-b562-5254006c6af5 (blocks here) A heap examination of the ClusterConnectionBridge on node1 reveals it is blocked on flow control.

      Unless the producer-window-size is disabled with -1 or set very high, the cluster connection blocks indefinitely with a status of blockedOnFlowControl=true when large messages are sent across the bridge, resulting in stuck messages in snf queues.

              csuconic@redhat.com Clebert Suconic
              rhn-support-dhawkins Duane Hawkins
              Roman Vais Roman Vais (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: