Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2312

[AMQ6, Topic, transaction, PFC] Publisher that is throttled in transaction does not get removed when connection is killed.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.3.x
    • JBoss A-MQ 6.3
    • broker
    • None
    • +
    • Hide

      use

       <systemUsage>
                  <systemUsage sendFailIfNoSpace="true">
                      <memoryUsage>
                     ....
      

      or

      <policyEntry topic="my.topic" memoryLimit="2mb" sendFailIfNoSpace="true"/>
      

      As described in the description.

      Show
      use <systemUsage> <systemUsage sendFailIfNoSpace= " true " > <memoryUsage> .... or <policyEntry topic= "my.topic" memoryLimit= "2mb" sendFailIfNoSpace= " true " /> As described in the description.
    • Hide

      Using a broker with the following policy entry

        <policyEntry topic="my.topic" memoryLimit="2mb" />
      

      1) create a durable sub on "my.topic"
      2) shutdown the durable sub (but leave it registered)
      3) create the publisher to "my.topic" and send 100 message 200KB in one local (not XA) JMS transaction .
      4) the publisher will block
      5) kill the underlying connection - using JMX connection.stop() operation.

      RESULT:
      Connection is dropped BUT producer/publisher appears to be still registered on the topic .
      The transaction appears to be still inflight and the memoryUsageCount on the broker remains above 100%.

      Show
      Using a broker with the following policy entry <policyEntry topic= "my.topic" memoryLimit= "2mb" /> 1) create a durable sub on "my.topic" 2) shutdown the durable sub (but leave it registered) 3) create the publisher to "my.topic" and send 100 message 200KB in one local (not XA) JMS transaction . 4) the publisher will block 5) kill the underlying connection - using JMX connection.stop() operation. RESULT: Connection is dropped BUT producer/publisher appears to be still registered on the topic . The transaction appears to be still inflight and the memoryUsageCount on the broker remains above 100%.

    Description

      A publisher that is getting throttled (within a Local transaction) due to destination memory limit hitting 100%, are not getting removed when the underlying JMS connection is removed. In turn the transaction is not being rolled back.

      A potential consequence; if this is a large batch transaction, this can result in the Producer Flow Control being triggered on the topic. As the messages have not being committed yet, they cannot be consumed . So there is no way for the topic's "memory used" to fall below 100 %. This means the topic will be constantly throttling new or existing producers until the broker is restarted.

      The expectation is that, once the connection is killed the publisher should be cleared away and the transaction should be rolled back - reducing the memoryUsed to the value before the large batch transaction was started.

      I have tested with sendFailIfNoSpaceAfterTimeout on the destination policy and this does not make a difference to the outcome.

      NOTE Setting sendFailIfNoSpace at the systemUsage seems to avoid the issue. This will cause the broker to send an Exception rather than Block the publisher when trying to throttle

        <systemUsage>
                  <systemUsage sendFailIfNoSpace="true">
                      <memoryUsage>
                     ....
      
      

      It also seemed to take effect when set at the destination policy level

        <policyEntry topic="my.topic" memoryLimit="2mb" sendFailIfNoSpace="true"/>
      

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: