Get topic messages
Constructor
Description
new MirrorConsensusTopicQuery()Method
Type
Description
Requirement
new MirrorConsensusTopicQuery()
.setTopicId(topicId)
.subscribe(mirrorClient, resp -> {
String messageAsString = new String(resp.message, StandardCharsets.UTF_8);
System.out.println(resp.consensusTimestamp + " received topic message: " + messageAsString);
},
// On gRPC error, print the stack trace
Throwable::printStackTrace);
//v1.3.2new MirrorConsensusTopicQuery()
.setTopicId(topicId)
.subscribe(
consensusClient,
(message) => console.log(message.toString()),
(error) => console.log(`Error: ${error}`)
);Last updated