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

Add pending-transactions-count to JMX

    XMLWordPrintable

    Details

      Description

      When using EAP and a container-managed MDB with more than one session (15 by default) is killed while working (unclean shutdown), you may end up with a "persistent" delivering-count, which means that the counter is always greater than zero with no consumer connected, even after broker restart.

      In this case, some prepared transactions remain "orphaned" on the broker and never be recovered by the client upon restart. This kind of transactions hold the counter up, because for each of them there is a message that can't be delivered to anybody else.

      Is there a way to automatically recover from this situation? Can we add pending-transactions-count to queue's statistics?

      [standalone@localhost:9990 /] /subsystem=messaging-activemq/server=default/runtime-queue=jms.queue.NotifQueue:read-resource(recursive=true, include-defaults=true, include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "consumer-count" => 0,
              "dead-letter-address" => "jms.queue.DLQ",
              "delivering-count" => 2,
              "durable" => true,
              "expiry-address" => "jms.queue.ExpiryQueue",
              "filter" => undefined,
              "id" => 26L,
              "message-count" => 2L,
              "messages-added" => 2L,
              "paused" => false,
              "queue-address" => "jms.queue.NotifQueue",
              "scheduled-count" => 0L,
              "temporary" => false
          }
      }
      
      [standalone@localhost:9990 /] /subsystem=messaging-activemq/server=default:list-prepared-transactions()
      {
          "outcome" => "success",
          "result" => [
              "2/18/20 12:32:47 PM base64: AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHCwAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHCGNsaWVudC1lYXAHAgIA XidImpl (1265671073 bq:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-1
      21.11.0.0.0.1.0.0.0.0 formatID:131077 gtxid:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-121.8.99.108.105.101.110.116.45.101.97.112 base64:AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHCwAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaIV
      J5BeS8pkAACHCGNsaWVudC1lYXAHAgIA",
              "2/18/20 12:32:47 PM base64: AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHDwAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHCGNsaWVudC1lYXAHAgIA XidImpl (1951269675 bq:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-1
      21.15.0.0.0.1.0.0.0.0 formatID:131077 gtxid:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-121.8.99.108.105.101.110.116.45.101.97.112 base64:AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHDwAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaIV
      J5BeS8pkAACHCGNsaWVudC1lYXAHAgIA",
              "2/18/20 12:32:47 PM base64: AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHFQAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHEmNsaWVudC1lYXAHAgIA XidImpl (1211606749 bq:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-1
      21.21.0.0.0.1.0.0.0.0 formatID:131077 gtxid:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.-94.21.39.-112.94.75.-54.100.0.0.-121.18.99.108.105.101.110.116.45.101.97.112 base64:AAAAAAAAAAAAAP__fwAAAaIVJ5BeS8pkAACHFQAAAAEAAAAAAAAAAAAAAAAAAP__fwAAAaI
      VJ5BeS8pkAACHEmNsaWVudC1lYXAHAgIA"
          ]
      }
      

        Attachments

          Activity

            People

            Assignee:
            ataylor Andy Taylor
            Reporter:
            fvaleri Federico Valeri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: