activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LarsE (JIRA)" <j...@activemq.org>
Subject [jira] Commented: (AMQ-422) problems with reliable after network outage
Date Sat, 18 Mar 2006 22:39:26 GMT
    [ http://jira.activemq.org/jira//browse/AMQ-422?page=comments#action_35838 ] 

LarsE commented on AMQ-422:
---------------------------

We are currently testing master-slave in the snapshot version. We'll probably put it in production
as soon as 4.0 becomes a release.

> problems with reliable after network outage
> -------------------------------------------
>
>          Key: AMQ-422
>          URL: http://jira.activemq.org/jira//browse/AMQ-422
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker, Transport
>     Versions: 3.2.1, 3.1, 3.2
>  Environment: OS: winXP pro
> jdk: 1.4.2_09
>     Reporter: steve liles
>  Attachments: activeMQtest.zip
>
>
> I'm trying to create a distributed topic between two servers for high availability (pretty
much as described in http://activemq.codehaus.org/Networks+of+Brokers).  Both of the servers
want to produce/consume messages to/from this topic.
> The config looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
> <beans>
>   <broker>
>     <connector>
>       <tcpServerTransport uri="tcp://SERVER1:61616" backlog="1000" useAsyncSend="true"
maxOutstandingMessages="50"/>
>     </connector>    
>     <networkConnector>      
>       <networkChannel uri="reliable:tcp://SERVER2:61616" remoteBrokerName="whocares"/>
   
>     </networkConnector>    
>     <persistence>      
>       <vmPersistence/>    
>     </persistence>   
>   </broker>
> </beans>
> Initial setup is fine, and upon starting both servers they connect and happily message
with each other. However, problems arise if one of the servers is restarted or if a network
outage occurs.
> If one server (SERVER1, say) is stopped and restarted, reconnection occurs but messages
are then received twice by the other server (SERVER2 - the one that was not stopped).  The
activeMQ logging I get from SERVER2 on reconnect is:
> 14:56:16,765 channel status changed: Channel: tcp://192.168.1.171:61616 has reconnected
> 14:56:16,890 Adding new client: ID:elephant-3033-1132757775296-0:0_NetworkChannel on
transport: TcpTransportChannel: Socket[addr=/192.168.1.172,port=3035,localport=61615]
> but after this all messages are received once on SERVER1 and twice on SERVER2.
> I could just about live with that, but...
> ...if both servers are running but encounter a network outage (ie. I disable then re-enable
the network of one machine) I get one of two situations:
> 1) Both servers appear to reconnect, but neither one receives *any* messages any more,
or
> 2) The servers reconnect, but upon one server posting to the topic, both are sent into
an infinite loop receiving the same message for ever. 
> I've attached an eclipse project with some simple test classes.  Run "Main" on two machines
and specify the local host/port and remote host/port as arguments to the Main class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message