Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5649

Maximum producers allowed per connection doesn't work for anonymous producers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.10.1, 5.11.0
    • 5.12.0
    • Broker

    Description

      There is a configuration option on TransportConnector to set the maximum number of producers allowed per connection. This is validated in TransportConnection in the processAddProducer method.

      The issue is that the code to enforce the check first tests if the destination is null and will not enforce the check if the destination is null. This means that when a client creates an anonymous producer on a session this setting will be ignored which is not the correct behavior. Even if the producers are anonymous this option should still limit to the total number of producers on the connection. The problem is here on line 605 of TransportConnection.java:

      if (destination != null && !AdvisorySupport.isAdvisoryTopic(destination)) {
        ....
      }
      

      This simply should be changed to:

      if (!AdvisorySupport.isAdvisoryTopic(destination)) {
        ....
      }
      

      I'll be submitting a pull request (with unit tests) shortly.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            cshannon Christopher L. Shannon
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: