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

Large messages are not deleted if spring MessageTemplate.sendAndReceive method timeout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • A-MQ 7.0.0.GA
    • broker-core
    • Hide

      Download attached test case zip file. Then

      • start a JBoss instance with the standalone-full-ha.xml profile
      • deploy the test case war file.
      • run the test case shell script
      • cd to the largemessages directory. See the number of files
      • start jboss-cli and run
        [standalone@localhost:9990 /] /subsystem=messaging-activemq/server=default/jms-queue=responseQueue:read-resource(recursive=true,include-runtime=true,include-defaults=true)
        {
            "outcome" => "success",
            "result" => {
                "consumer-count" => 0,
                "dead-letter-address" => "jms.queue.DLQ",
                "delivering-count" => 0,
                "durable" => true,
                "entries" => [
                    "java:/jms/queue/responseQueue",
                    "java:jboss/jms/queue/responseQueue",
                    "java:jboss/exported/jms/queue/responseQueue"
                ],
                "expiry-address" => "jms.queue.ExpiryQueue",
                "legacy-entries" => undefined,
                "message-count" => 5L,
                "messages-added" => 49L,
                "paused" => false,
                "queue-address" => "jms.queue.responseQueue",
                "scheduled-count" => 0L,
                "selector" => undefined,
                "temporary" => false
            }
        }
        

        there are 5 messages on the responseQueue but there are 7 files in the largemessages directory

        ls -l
        total 120232
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 3806.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 5321.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 6574.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 7949.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 8982.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 9282.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 9290.msg
        
      • run
        /subsystem=messaging-activemq/server=default/jms-queue=responseQueue:remove-messages()
      • at this point there should be no messages on the responseQueue queue and not files in the largemessages directory. But there 2 files left in the largemessages directory
        ls -l 
        total 34352
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 8982.msg
        -rw-r--r--  1 tomr  staff  8792877 16 Feb 10:39 9290.msg
        
      Show
      Download attached test case zip file. Then start a JBoss instance with the standalone-full-ha.xml profile deploy the test case war file. run the test case shell script cd to the largemessages directory. See the number of files start jboss-cli and run [standalone@localhost:9990 /] /subsystem=messaging-activemq/server=default/jms-queue=responseQueue:read-resource(recursive=true,include-runtime=true,include-defaults=true) { "outcome" => "success", "result" => { "consumer-count" => 0, "dead-letter-address" => "jms.queue.DLQ", "delivering-count" => 0, "durable" => true, "entries" => [ "java:/jms/queue/responseQueue", "java:jboss/jms/queue/responseQueue", "java:jboss/exported/jms/queue/responseQueue" ], "expiry-address" => "jms.queue.ExpiryQueue", "legacy-entries" => undefined, "message-count" => 5L, "messages-added" => 49L, "paused" => false, "queue-address" => "jms.queue.responseQueue", "scheduled-count" => 0L, "selector" => undefined, "temporary" => false } } there are 5 messages on the responseQueue but there are 7 files in the largemessages directory ls -l total 120232 -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 3806.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 5321.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 6574.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 7949.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 8982.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 9282.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 9290.msg run /subsystem=messaging-activemq/server=default/jms-queue=responseQueue:remove-messages() at this point there should be no messages on the responseQueue queue and not files in the largemessages directory. But there 2 files left in the largemessages directory ls -l total 34352 -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 8982.msg -rw-r--r-- 1 tomr staff 8792877 16 Feb 10:39 9290.msg

      It seems that when spring MessageTemplate.sendAndReceive() method timeout when sending large message the large message body does not gets deleted from largemessages directory. If the server runs for long time without a restart those undeleted large message bodies eventually fill up whole disk.
      This only happens if the JBoss instance is started up using standalone-full-ha.xml profile. If standalone-full.xml profile is used the issue does not occur.

            gaohoward Howard Gao
            rhn-support-toross Tom Ross
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: