[jira] Created: (AMQ-1928) Limit the maximum number of connections to a Broker

View: New views
8 Messages — Rating Filter:   Alert me  

[jira] Created: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Limit the maximum number of connections to a Broker
---------------------------------------------------

                 Key: AMQ-1928
                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
             Project: ActiveMQ
          Issue Type: New Feature
    Affects Versions: 5.1.0, 5.0.0, 4.1.2, 4.1.1
            Reporter: Rob Davies
            Assignee: Rob Davies
             Fix For: 5.2.0


Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1928.
-----------------------------

    Resolution: Fixed

Fixed by SVN revision 692009

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder reopened AMQ-1928:
-------------------------------

      Assignee: Bruce Snyder  (was: Rob Davies)

This issue was originally raised by me on the mailing list as a way to limit the number of client connections into the broker. A variable and a condition was added to provide this functionality and can be used as follows:

{code}
<transportConnector name="openwire" uri="tcp://localhost:61616?maximumConnections=100" />
{code}

Unfortunately, when the max number of connections is exceeded, there is no information to indicate what happened. Below is an example of the exception that is thrown:

{code}
javax.jms.JMSException: Channel was inactive for too long: localhost/127.0.0.1:61616
  at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
  at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1255)
  at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
  at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:488)
  at ConsumerTool.run(Unknown Source)
  at ConsumerTool.main(Unknown Source)
Caused by: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616
  at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:225)
  at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:83)
  at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:100)
  at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
  at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:74)
  at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:79)
  at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
  ... 4 more
{code}

This exception is completely generic and provides no information about why the failure occurred. The reason for this that the conditional block is completely empty:

{code}
try {
            if (this.currentTransportCount >= this.maximumConnections) {
                throw new ExceededMaximumConnectionsException(maximumConnections);
            }else {
...
{code}

Therefore I'm reopening issue in order to create a good exception for the failure so that users can identify the specific failure.

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.2.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder updated AMQ-1928:
------------------------------

    Fix Version/s:     (was: 5.2.0)
                   5.3.0

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.3.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder resolved AMQ-1928.
-------------------------------

    Resolution: Fixed

Committed changes in [revision 789520 |http://svn.apache.org/viewvc?rev=789520&view=rev].

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.3.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder reopened AMQ-1928:
-------------------------------


Reopening again because I forgot to throw a better exception back to the client side.

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.3.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Bruce Snyder commented on AMQ-1928:
-----------------------------------

Backed out [revision 789520|http://svn.apache.org/viewvc?rev=789520&view=rev] because I mistakenly made a commit to the 5.2.0 tag.

I've moved the change for the broker-side exception to the trunk via [revision 789851|http://svn.apache.org/viewvc?view=rev&revision=789851].

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.3.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-1928) Limit the maximum number of connections to a Broker

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/AMQ-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies updated AMQ-1928:
----------------------------

    Fix Version/s:     (was: 5.3.0)
                   5.4.0

> Limit the maximum number of connections to a Broker
> ---------------------------------------------------
>
>                 Key: AMQ-1928
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1928
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 4.1.1, 4.1.2, 5.0.0, 5.1.0
>            Reporter: Rob Davies
>            Assignee: Bruce Snyder
>             Fix For: 5.4.0
>
>
> Add a property (maximumConnections) to TcpTransportSever to limit a maximum number of active connections

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.