-
-
Save push-gists/858e25961721dc5d34e3ab256d5c9762 to your computer and use it in GitHub Desktop.
Add a stream of maps
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( | |
"json/data", | |
JSON.class, | |
new MapStreamAdapter(new MapStream() { | |
@Override | |
public void onTransformationException(String topicPath, JSON value, Exception e) { | |
// Handle errors | |
} | |
@Override | |
public void onValue( | |
String topicPath, | |
TopicSpecification topicSpecification, | |
Map<String, Object> oldValue, | |
Map<String, Object> newValue) { | |
// Do something awesome | |
} | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment