Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a generic transformed stream by using a StreamBuilder
StreamBuilders.newBinaryStreamBuilder()
.transform(Bytes::toByteArray)
.transform(String::new)
.create(
session.feature(Topics.class),
"binary/data",
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
You can’t perform that action at this time.