Skip to content

Instantly share code, notes, and snippets.

@danielkec

danielkec/ma1.java

Last active Mar 20, 2020
Embed
What would you like to do?
messaging-article-1
@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