Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class ExampleBean {
private final SubmissionPublisher<String> publisher = new SubmissionPublisher<>();
public void sendMessage(String message) {
publisher.submit(message);
}
@Outgoing("to-kafka")
public Publisher<String> preparePublisher() {
return ReactiveStreams
.fromPublisher(FlowAdapters.toPublisher(publisher))
.buildRs();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment