LibraryToggle FramesPrintFeedback

When connecting to a broker network, producers and consumers must be distributed across the available brokers. For example, in the case of a producer connecting to the concentrator topology shown in Figure 2.22, the producer should connect using a failover URL that shares the load across the brokers in the first layer, A, B, and C. Assuming that the brokers are running on separate hosts—brokerA, brokerB, and brokerC—and assuming that they all listen on IP port 61616, the producers should use the following failover URL to connect to the broker network:

failover://(tcp://brokerA:61616,tcp://brokerB:61616,tcp://brokerC:61616)

By default, a producer will randomly select one of the URLs in the failover list and attempt to connect to it. If the first connection attempt fails, the producer will try the other URLs in turn. For more details of the failover protocol, see Failover Protocol.

Comments powered by Disqus