The Fanout TransportThe Fanout transport layers reconnect and replication logic on top of any of the other transports. It utilizes the Discovery transport to discover brokers and replicates commands to those brokers. Configuration Syntaxfanout:(discoveryURI)?transportOptions Transport Options
The 'fanOutQueues' option is specific to the fanout transport. By default, the fanout does not replicate commands to queues; only topics. Therefore, if you'd like to fanout a message send command to multiple queues on multiple brokers, you'll have to set this option to 'true'. By default, a client's fanout transport waits for connections to be established to 2 brokers, or the number of static TCP URIs configured (if more than 2). Until this number of connections is established, the client's call to Connection.createSession() does not return. For example, a producer that uses the fanout connector listed below will wait until 2 brokers are running, and connections are established to those two brokers.
fanout:(multicast://default)
Another example would be a producer using the following fanout connector. fanout:(static:(tcp://localhost:61629,tcp://localhost:61639,tcp://localhost:61649)) In this case, three broker connections are needed. However, this required number of connections can be overridden by using the minAckCount transport option. For example, this fanout connector allows the producer to run after connecting to just one broker.
fanout:(multicast://default)?minAckCount=1
Example URIfanout:(static:(tcp://localhost:61616,tcp://remotehost:61616))?initialReconnectDelay=100
|