Skip to content

Instantly share code, notes, and snippets.

@danielkec
Created June 22, 2020 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielkec/40dee4be93f8d0bddc98968db04a0e4b to your computer and use it in GitHub Desktop.
Save danielkec/40dee4be93f8d0bddc98968db04a0e4b to your computer and use it in GitHub Desktop.
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