Skip to content

Commit 35bb022

Browse files
committed
Add more ABSwitchCluster documentation
1 parent f887d5c commit 35bb022

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/reference/asciidoc/kafka.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ To close existing Producers, call `reset()` on the `DefaultKafkaProducerFactory`
1919
To close existing Consumers, call `stop()` (and then `start()`) on the `KafkaListenerEndpointRegistry` and/or `stop()` and `start()` on any other listener container beans.
2020

2121
For convenience, the framework also provides an `ABSwitchCluster` which supports two sets of bootstrap servers; one of which is active at any time.
22+
Configure the `ABSwitchCluster` and add it to the pruducer and consumer factories, and the `KafkaAdmin`, by calling `setBootstrapServersSupplier()`.
23+
When you want to switch, call `primary()` or `secondary()` and call `reset()` on the producer factory to establish new connection(s); for consumers, `stop()` and `start()` all listener containers.
24+
When using `@KafkaListener` s, `stop()` and `start()` the `KafkaListenerEndpointRegistry` bean.
2225

2326
See the Javadocs for more information.
2427

0 commit comments

Comments
 (0)