Last active
March 20, 2020 13:36
-
-
Save danielkec/0e2ee04bb60516b46382cf9031c8a66f to your computer and use it in GitHub Desktop.
messaging-article-1
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("publisher-payload") | |
public PublisherBuilder<Integer> streamOfMessages() { | |
return ReactiveStreams.of(1, 2, 3); | |
} | |
@Incoming("publisher-payload") | |
@Outgoing("wrapped-message") | |
public Message<String> rewrapMessageManually(Message<Integer> message) { | |
return Message.of(Integer.toString(message.getPayload())); | |
} | |
@Incoming("wrapped-message") | |
public void consumeImplicitlyUnwrappedMessage(String value) { | |
System.out.println("Consuming message: " + value); | |
} | |
> Consuming message: 1 | |
> Consuming message: 2 | |
> Consuming message: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment