activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder (JIRA)" <>
Subject [jira] Reopened: (AMQ-1928) Limit the maximum number of connections to a Broker
Date Mon, 29 Jun 2009 23:42:07 GMT


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:

<transportConnector name="openwire" uri="tcp://localhost:61616?maximumConnections=100"

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: 

javax.jms.JMSException: Channel was inactive for too long: localhost/
  at org.apache.activemq.util.JMSExceptionSupport.create(
  at org.apache.activemq.ActiveMQConnection.syncSendPacket(
  at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(
  at org.apache.activemq.ActiveMQConnection.start(
  at Source)
  at ConsumerTool.main(Unknown Source)
Caused by: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too
long: localhost/
  at org.apache.activemq.transport.InactivityMonitor.oneway(
  at org.apache.activemq.transport.TransportFilter.oneway(
  at org.apache.activemq.transport.WireFormatNegotiator.oneway(
  at org.apache.activemq.transport.MutexTransport.oneway(
  at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
  at org.apache.activemq.transport.ResponseCorrelator.request(
  at org.apache.activemq.ActiveMQConnection.syncSendPacket(
  ... 4 more

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: 

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

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:
>             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.

View raw message