You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/03/08 17:24:38 UTC

[jira] [Commented] (AMQ-5649) Maximum producers allowed per connection doesn't work for anonymous producers

    [ https://issues.apache.org/jira/browse/AMQ-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352125#comment-14352125 ] 

ASF GitHub Bot commented on AMQ-5649:
-------------------------------------

GitHub user cshannon opened a pull request:

    https://github.com/apache/activemq/pull/68

    AMQ-5649: Fixed max producers per connection for anonymous producers

    Modified TransportConnection so that maximumProducersAllowedPerConnection will be enforced even for anonymous producers.
    
    This resolves https://issues.apache.org/jira/browse/AMQ-5649
    
    Two unit tests have been added for this ticket.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cshannon/activemq AMQ-5649

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/68.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #68
    
----
commit d8a2ce393faeb9975e066a48d1498a81fb2025be
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Date:   2015-03-08T15:34:28Z

    AMQ-5649: Modified TransportConnection so that maximumProducersAllowedPerConnection will be enforced even for anonymous producers.
    
    This resolves https://issues.apache.org/jira/browse/AMQ-5649
    
    Two unit tests have been added for this ticket.

----


> Maximum producers allowed per connection doesn't work for anonymous producers
> -----------------------------------------------------------------------------
>
>                 Key: AMQ-5649
>                 URL: https://issues.apache.org/jira/browse/AMQ-5649
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.10.1, 5.11.0
>            Reporter: Christopher L. Shannon
>            Priority: Minor
>              Labels: easyfix
>
> 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}}:
> {code}
> if (destination != null && !AdvisorySupport.isAdvisoryTopic(destination)) {
>   ....
> }
> {code}
> This simply should be changed to:
> {code}
> if (!AdvisorySupport.isAdvisoryTopic(destination)) {
>   ....
> }
> {code}
> I'll be submitting a pull request (with unit tests) shortly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)