-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference Doc Improvements #2867
Reference Doc Improvements #2867
Conversation
} | ||
public void send(String toSend, int key) { | ||
this.template.send("topic1", key, toSend); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -15,7 +15,7 @@ To close existing Consumers, call `stop()` (and then `start()`) on the `KafkaLis | |||
For convenience, the framework also provides an `ABSwitchCluster` which supports two sets of bootstrap servers; one of which is active at any time. | |||
Configure the `ABSwitchCluster` and add it to the producer and consumer factories, and the `KafkaAdmin`, by calling `setBootstrapServersSupplier()`. | |||
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. | |||
When using `@KafkaListener` s, `stop()` and `start()` the `KafkaListenerEndpointRegistry` bean. | |||
When using `@KafkaListener`+++s+++, `stop()` and `start()` the `KafkaListenerEndpointRegistry` bean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `ProducerFactory` - see xref:kafka/sending-messages.adoc[Sending Messages] | ||
* `ConsumerFactory` - see xref:kafka/receiving-messages.adoc[Receiving Messages] | ||
|
||
Starting with version 2.5, each of these extends `KafkaResourceFactory`. | ||
This allows changing the bootstrap servers at runtime by adding a `Supplier<String>` to their configuration: `setBootstrapServersSupplier(() -> ...)`. | ||
This allows changing the bootstrap servers at runtime by adding a `Supplier<String>` to their configuration: `setBootstrapServersSupplier(() +++->+++ ...)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> is special char in AsciiDoc, so we could use +++ to render it literally
.assignReplicas(2, Arrays.asList(2, 0)) | ||
.assignReplicas(0, List.of(0, 1)) | ||
.assignReplicas(1, List.of(1, 2)) | ||
.assignReplicas(2, List.of(2, 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary, but we have used Java 17, why not use the handy collection constant feature introduced since Java 9?
4002fae
to
0f60347
Compare
0f60347
to
59b0324
Compare
Thanks!! |
some minor improvements to reference. See self-comments for the rationale behind the changes. Potentially more similar PRs will come in later