Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-17419

The description of redelivery related attributes in Configuring Messaging document should be corrected.

XMLWordPrintable

    • +
    • +
    • Hide

      I confirmed these parameters' behavior on EAP 7.2.0 using helloworld_02444826_v2.zip (attached).

      Step to Reproduce

      1. Install EAP 7.2.0 and create node1.

      $ cd <your work dir>
      $ unzip /path/to/jboss-eap-7.2.0.zip
      $ jboss-eap-7.2 jboss-eap-7.2.0
      $ cp -a jboss-eap-7.2.0/standalone node1
      

      2. Modify node1/configuration/standalone-full.xml (add the line (*2-1) and (*2-2)).

              <subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
                  <server name="default">
                      <journal pool-files="10"/>
                      <security-setting name="#">
                          <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                      </security-setting>
                      <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
                      <address-setting name="jms.queue.exampleQueue" redelivery-delay="5000" />    <---------- (2-1)
                      <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                      <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                          <param name="batch-delay" value="50"/>
                      </http-connector>
                      <in-vm-connector name="in-vm" server-id="0">
                          <param name="buffer-pooling" value="false"/>
                      </in-vm-connector>
                      <http-acceptor name="http-acceptor" http-listener="default"/>
                      <http-acceptor name="http-acceptor-throughput" http-listener="default">
                          <param name="batch-delay" value="50"/>
                          <param name="direct-deliver" value="false"/>
                      </http-acceptor>
                      <in-vm-acceptor name="in-vm" server-id="0">
                          <param name="buffer-pooling" value="false"/>
                      </in-vm-acceptor>
                      <jms-queue name="exampleQueue" entries="java:/jms/queue/exampleQueue"/>    <---------- (2-2)
                      <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                      <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                      <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                      <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
                      <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
                  </server>
              </subsystem>
      

      3. Start node1.

      $ $JBOSS_HOME/bin/standalone.sh -Djboss.server.base.dir=./node1 -c standalone-full.xml
      

      4. Build and deploy helloworld_02444826_v2 testcase.

      $ unzip /path/to/jboss-eap-7.2.0-quickstarts.zip
      $ cd jboss-eap-7.2.0.GA-quickstarts
      $ unzip /path/to/helloworld_02444826_v2.zip
      $ cd helloworld_02444826_v2
      $ mvn clean package wildfly:deploy
      

      5. Access to http://localhost:8080/helloworld/HelloWorld .

      Result

      Give attributes to address-setting element of (2-1).

      • redelivery-delay="5000"
        12:59:01,212 INFO  [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message
        12:59:01,244 INFO  [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message
        12:59:06,264 INFO  [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 5001 milliseconds.    <---------- redelivery-delay (5000)
        12:59:11,273 INFO  [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 5001 milliseconds.    <---------- the previous redelivery delay (5000) * redelivery-multiplier (1.0)
        12:59:16,281 INFO  [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 5003 milliseconds.    <---------- the previous redelivery delay (5000) * redelivery-multiplier (1.0)
        12:59:21,295 INFO  [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 5004 milliseconds.
        12:59:26,305 INFO  [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 5000 milliseconds.
        12:59:31,316 INFO  [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 5002 milliseconds.
        12:59:36,325 INFO  [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 5002 milliseconds.
        12:59:41,333 INFO  [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 5001 milliseconds.
        12:59:46,340 INFO  [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 5001 milliseconds.
        
      • redelivery-delay="5000" redelivery-multiplier="2.0"
        13:04:46,152 INFO  [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message
        13:04:46,191 INFO  [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message
        13:04:51,212 INFO  [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 4998 milliseconds.     <---------- redelivery-delay (5000)
        13:05:01,222 INFO  [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 10001 milliseconds.    <---------- the previous redelivery delay (5000) * redelivery-multiplier (2.0)
        13:05:21,235 INFO  [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 20002 milliseconds.    <---------- the previous redelivery delay (10000) * redelivery-multiplier (2.0)
        13:06:01,245 INFO  [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 40003 milliseconds.    <---------- the previous redelivery delay (20000) * redelivery-multiplier (2.0)
        13:06:51,253 INFO  [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 50000 milliseconds.    <---------- the previous redelivery delay (40000) * redelivery-multiplier (2.0) = 80000, but limited to max-redelivery-delay (redelivery-delay (5000) * 10 = 50000)
        13:07:41,262 INFO  [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 50003 milliseconds.
        13:08:31,273 INFO  [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 50003 milliseconds.
        13:09:21,281 INFO  [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 50001 milliseconds.
        13:10:11,289 INFO  [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 50003 milliseconds.
        
      • redelivery-delay="5000" redelivery-multiplier="2.0" max-redelivery-delay="0"
        13:21:10,808 INFO  [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message
        13:21:10,847 INFO  [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message
        13:21:10,869 INFO  [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 2 milliseconds.     <---------- redelivery-delay = 5000, but limited to max-redelivery-delay (0)
        13:21:10,879 INFO  [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 4 milliseconds.
        13:21:10,889 INFO  [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 4 milliseconds.
        13:21:10,898 INFO  [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 2 milliseconds.
        13:21:10,911 INFO  [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 3 milliseconds.
        13:21:10,915 INFO  [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 0 milliseconds.
        13:21:10,921 INFO  [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 3 milliseconds.
        13:21:10,936 INFO  [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 1 milliseconds.
        13:21:10,945 INFO  [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 2 milliseconds.
        

      Reference

      These parameters' behavior is basically derived from ActiveMQ Artemis (*2).

      (*2) Apache ActiveMQ Artemis User Manual (2.6.0) - Message Redelivery and Undelivered Messages
      https://activemq.apache.org/components/artemis/documentation/2.6.0/undelivered-messages.html

      Show
      I confirmed these parameters' behavior on EAP 7.2.0 using helloworld_02444826_v2.zip (attached). Step to Reproduce 1. Install EAP 7.2.0 and create node1. $ cd <your work dir> $ unzip /path/to/jboss-eap-7.2.0.zip $ jboss-eap-7.2 jboss-eap-7.2.0 $ cp -a jboss-eap-7.2.0/standalone node1 2. Modify node1/configuration/standalone-full.xml (add the line (*2-1) and (*2-2)). <subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0"> <server name="default"> <journal pool-files="10"/> <security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting> <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/> <address-setting name="jms.queue.exampleQueue" redelivery-delay="5000" /> <---------- (2-1) <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/> <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput"> <param name="batch-delay" value="50"/> </http-connector> <in-vm-connector name="in-vm" server-id="0"> <param name="buffer-pooling" value="false"/> </in-vm-connector> <http-acceptor name="http-acceptor" http-listener="default"/> <http-acceptor name="http-acceptor-throughput" http-listener="default"> <param name="batch-delay" value="50"/> <param name="direct-deliver" value="false"/> </http-acceptor> <in-vm-acceptor name="in-vm" server-id="0"> <param name="buffer-pooling" value="false"/> </in-vm-acceptor> <jms-queue name="exampleQueue" entries="java:/jms/queue/exampleQueue"/> <---------- (2-2) <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/> <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/> <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/> <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/> <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/> </server> </subsystem> 3. Start node1. $ $JBOSS_HOME/bin/standalone.sh -Djboss.server.base.dir=./node1 -c standalone-full.xml 4. Build and deploy helloworld_02444826_v2 testcase. $ unzip /path/to/jboss-eap-7.2.0-quickstarts.zip $ cd jboss-eap-7.2.0.GA-quickstarts $ unzip /path/to/helloworld_02444826_v2.zip $ cd helloworld_02444826_v2 $ mvn clean package wildfly:deploy 5. Access to http://localhost:8080/helloworld/HelloWorld . Result Give attributes to address-setting element of (2-1). redelivery-delay="5000" 12:59:01,212 INFO [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message 12:59:01,244 INFO [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message 12:59:06,264 INFO [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 5001 milliseconds. <---------- redelivery-delay (5000) 12:59:11,273 INFO [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 5001 milliseconds. <---------- the previous redelivery delay (5000) * redelivery-multiplier (1.0) 12:59:16,281 INFO [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 5003 milliseconds. <---------- the previous redelivery delay (5000) * redelivery-multiplier (1.0) 12:59:21,295 INFO [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 5004 milliseconds. 12:59:26,305 INFO [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 5000 milliseconds. 12:59:31,316 INFO [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 5002 milliseconds. 12:59:36,325 INFO [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 5002 milliseconds. 12:59:41,333 INFO [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 5001 milliseconds. 12:59:46,340 INFO [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 5001 milliseconds. redelivery-delay="5000" redelivery-multiplier="2.0" 13:04:46,152 INFO [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message 13:04:46,191 INFO [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message 13:04:51,212 INFO [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 4998 milliseconds. <---------- redelivery-delay (5000) 13:05:01,222 INFO [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 10001 milliseconds. <---------- the previous redelivery delay (5000) * redelivery-multiplier (2.0) 13:05:21,235 INFO [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 20002 milliseconds. <---------- the previous redelivery delay (10000) * redelivery-multiplier (2.0) 13:06:01,245 INFO [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 40003 milliseconds. <---------- the previous redelivery delay (20000) * redelivery-multiplier (2.0) 13:06:51,253 INFO [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 50000 milliseconds. <---------- the previous redelivery delay (40000) * redelivery-multiplier (2.0) = 80000, but limited to max-redelivery-delay (redelivery-delay (5000) * 10 = 50000) 13:07:41,262 INFO [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 50003 milliseconds. 13:08:31,273 INFO [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 50003 milliseconds. 13:09:21,281 INFO [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 50001 milliseconds. 13:10:11,289 INFO [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 50003 milliseconds. redelivery-delay="5000" redelivery-multiplier="2.0" max-redelivery-delay="0" 13:21:10,808 INFO [stdout] (default task-1) ***** Sent message to exampleQueue: this is a text message 13:21:10,847 INFO [stdout] (default task-1) ***** [1] delivery from exampleQueue: this is a text message 13:21:10,869 INFO [stdout] (default task-1) ***** [2] delivery from exampleQueue: this is a text message after 2 milliseconds. <---------- redelivery-delay = 5000, but limited to max-redelivery-delay (0) 13:21:10,879 INFO [stdout] (default task-1) ***** [3] delivery from exampleQueue: this is a text message after 4 milliseconds. 13:21:10,889 INFO [stdout] (default task-1) ***** [4] delivery from exampleQueue: this is a text message after 4 milliseconds. 13:21:10,898 INFO [stdout] (default task-1) ***** [5] delivery from exampleQueue: this is a text message after 2 milliseconds. 13:21:10,911 INFO [stdout] (default task-1) ***** [6] delivery from exampleQueue: this is a text message after 3 milliseconds. 13:21:10,915 INFO [stdout] (default task-1) ***** [7] delivery from exampleQueue: this is a text message after 0 milliseconds. 13:21:10,921 INFO [stdout] (default task-1) ***** [8] delivery from exampleQueue: this is a text message after 3 milliseconds. 13:21:10,936 INFO [stdout] (default task-1) ***** [9] delivery from exampleQueue: this is a text message after 1 milliseconds. 13:21:10,945 INFO [stdout] (default task-1) ***** [10] delivery from exampleQueue: this is a text message after 2 milliseconds. Reference These parameters' behavior is basically derived from ActiveMQ Artemis (*2). (*2) Apache ActiveMQ Artemis User Manual (2.6.0) - Message Redelivery and Undelivered Messages https://activemq.apache.org/components/artemis/documentation/2.6.0/undelivered-messages.html

      Default value of max-redelivery-delay attribute is incorrectly described in the document "Configuring Messaging" (*1) like the following:

      Attribute Description
      max-redelivery-delay Maximum value for the redelivery-delay in milliseconds. The default is 0.

      The default should be redelivery-delay * 10.

      Also, from the document, relations between max-redelivery-delay and redelivery-multiplier are not explained, so these attributes should be described like the following:

      Attribute Description
      max-redelivery-delay Maximum value for the redelivery delay in milliseconds. max-redelivery-delay parameter can be set to prevent the delay from becoming too large. The default is redelivery-delay * 10.
      redelivery-multiplier Multiplier to apply to the redelivery-delay parameter. Each time a message is redelivered the delay period will be equal to the previous redelivery delay * redelivery-multiplier. The default is 1.0.

      (*1) Red Hat JBoss Enterprise Application Platform > 7.2 > Configuring Messaging - Chapter 17. Configuring Delayed Redelivery
      https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuring_messaging/configure_delayed_redelivery

              snelluli@redhat.com Sreelatha Nelluli
              rhn-support-myoshida Masato Yoshida
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: