activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <>
Subject [jira] Resolved: (AMQ-1655) Failed to add Connection warning for the new connections from STOMP clients
Date Thu, 05 Feb 2009 14:42:00 GMT


Dejan Bosanac resolved AMQ-1655.

    Resolution: Won't Fix
      Assignee: Dejan Bosanac

I can only reproduce this problem by trying to connect/disconnect durable subscriber very
fast, like in the following test
public void testMultipleConnect() throws Exception {
    	for (int i = 0; i < 100; i++) {
    		StompConnection stompConnection = new StompConnection();
                URI connectUri = new URI(bindAddress);
    		stompConnection.connect("system", "manager", "test");

the problem is that sometimes CONNECT command arrives before previous DISCONNECT and than
the broker fails to create a connection.

I don't think we can do much about it and this use case is a bit of a misuse of Stomp. A simple
workaround is to add a small (even 1ms works) pause just to get commands in order. But generally
you should think of reusing your connections better.

I'll resolve this issue for now, but if this is not your use case or you can help to reproduce
the problem with another example, please reopen it.

> Failed to add Connection warning for the new connections from STOMP clients
> ---------------------------------------------------------------------------
>                 Key: AMQ-1655
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>         Environment: AMQ 5.0 Stable release on Solaris 10
>            Reporter: vik dhawan
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
> When STOP clients polls the AMQ for new messages after every 15 seconds. we get following
warnings very frequently (not always but a lot of times). 
> 2008-04-09 11:33:47,172 [21.146.25:38733] WARN  TransportConnection            - Failed
to add Connection
> javax.jms.InvalidClientIDException: Broker: localhost - Client: WRK_omega_8755 already
connected from /IP:PORT
>         at
>         at
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(
>         at
>         at
>         at
>         at
>         at org.apache.activemq.command.ConnectionInfo.visit(
>         at
>         at$1.onCommand(
>         at org.apache.activemq.transport.TransportFilter.onCommand(
>         at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(
>         at org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad(
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(
>         at org.apache.activemq.transport.TransportSupport.doConsume(
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(
>         at
>         at

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

View raw message