Created
March 20, 2020 13:45
-
-
Save danielkec/2a745304a8453d84629e5cdbcf5664f8 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
@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