Skip to content

Instantly share code, notes, and snippets.

@danielkec

danielkec/ma7.java

Created Mar 20, 2020
Embed
What would you like to do?
@Outgoing("test-channel")
public Publisher<Message<String>> produceMessage() {
return ReactiveStreams.of(Message.of("test-data", () -> {
System.out.println("Message acked!");
return CompletableFuture.completedStage(null);
})).buildRs();
}
@Incoming("test-channel")
@Acknowledgment(Acknowledgment.Strategy.POST_PROCESSING)
public void receiveMessage(String msg) {
System.out.println("Received payload:" + msg);
}
> Received payload: test-data
> Message acked!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment