Created
June 22, 2020 19:48
-
-
Save danielkec/40dee4be93f8d0bddc98968db04a0e4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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