-
-
Save push-gists/a36ac6517c656635c789fde123a2ba3d to your computer and use it in GitHub Desktop.
Add a transformed stream
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
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