that needs an enhancement and may be tricky to implement b/c network
connectors cannot operate properly over failover reconnects.
masterslave does not do any retries - it just picks from the url list,
and should respect randomize=false on the first connect and reconnect
(when initiated by the networkConnector discovery agent)
but because it does not do reconnects via the failover transport
(maxReconnect=0) it does not track restarts and priority.


On 7 February 2014 15:56, Geurt Schimmel <gschim...@schubergphilis.com> wrote:
> Hi,
>
> randomize=false and priorityBackup are not working with the masterslave 
> protocol - or is this by design ?
>
> A client-broker has a masterslave setup towards hostA and hostB.
>
> Would like to failover to hostB if ActiveMQ on hostA is not available, but if 
> hostA becomes available again, would like to switch back to hostA. After 
> starting the client-broker, I see that it's often connected to hostB - 
> apparently, the order I specified is not honoured, so randomize=false is not 
> working. When shutting down the destination-broker it is currently connected 
> to, there is a failover indeed, but after that broker comes back, there is no 
> priorityBackup, so no switch back to hostA.
>
>   <networkConnector name="sbpamq102_sbpahdb" userName="system" 
> password="${activemq.password}" 
> uri="masterslave:(ssl://ipaddr_hostA:61616?wireFormat.maxInactivityDuration=0&amp;
>  
> connectionTimeout=3000,ssl://ipaddr_hostB:61616?wireFormat.maxInactivityDuration=0&amp;
>  
> connectionTimeout=3000)?timeout=5000&amp;randomize=false&amp;priorityBackup=true&amp;maxReconnectAttempts=-1"
>  duplex="false" networkTTL="10" prefetchSize="3000" staticBridge="true">
>         <staticallyIncludedDestinations>
>         ...
>         </staticallyIncludedDestinations>
>       </networkConnector>
>
> And the listeners on hostA and hostB:
>
> <transportConnector name="openwire" 
> uri="ssl://0.0.0.0:61616?jms.prefetchPolicy.queuePrefetch=4800" 
> updateClusterClients="true"  updateClusterClientsOnRemove="true"/>
>
> I checked https://issues.apache.org/jira/browse/AMQ-4501, reason why 
> rebalanceClusterClients in not in the transportconnector-config.
>
> Thanks,
> Geurt



-- 
http://redhat.com
http://blog.garytully.com

Reply via email to