activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "james strachan (JIRA)" <>
Subject [jira] Commented: (AMQ-422) problems with reliable after network outage
Date Sat, 18 Mar 2006 07:07:26 GMT
    [ ] 

james strachan commented on AMQ-422:

I'd recommend you all try out Master/Slave to give you HA

which is available in the forthcoming 4.0-RC1 release (its in the current SNAPSHOT distro
if you want to try it out)

> problems with reliable after network outage
> -------------------------------------------
>          Key: AMQ-422
>          URL:
>      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:
> I'm trying to create a distributed topic between two servers for high availability (pretty
much as described in  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" "">
> <beans>
>   <broker>
>     <connector>
>       <tcpServerTransport uri="tcp://SERVER1:61616" backlog="1000" useAsyncSend="true"
>     </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:// has reconnected
> 14:56:16,890 Adding new client: ID:elephant-3033-1132757775296-0:0_NetworkChannel on
transport: TcpTransportChannel: Socket[addr=/,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,
> 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:
For more information on JIRA, see:

View raw message