Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a transformed stream
session
.feature(Topics.class)
.addStream(
"binary/data",
Binary.class,
new StreamAdapter<>(
value -> new String(value.toByteArray()),
new TransformedStream.Default<Binary, String>() {
@Override
public void onValue(
String topicPath,
TopicSpecification specification,
String oldValue,
String newValue) {
// Do something awesome
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment