pubsub sample needs update for listener interface (#80)

This commit is contained in:
Leon Mai 2020-01-10 16:40:38 -08:00 committed by Artur Souza
parent 44a2806659
commit a7ad026e01
1 changed files with 2 additions and 2 deletions

View File

@ -35,9 +35,9 @@ public class Subscriber {
int port = Integer.parseInt(cmd.getOptionValue("port")); int port = Integer.parseInt(cmd.getOptionValue("port"));
// Subscribe to topic. // Subscribe to topic.
Dapr.getInstance().subscribeToTopic("message", (id, dataType, data, metadata) -> Mono Dapr.getInstance().subscribeToTopic("message", (envelope, metadata) -> Mono
.fromSupplier(() -> { .fromSupplier(() -> {
System.out.println("Subscriber got message (" + id + "): " + (data == null ? "" : new String(data))); System.out.println("Subscriber got message: " + (envelope.getData() == null ? "" : new String(envelope.getData())));
return Boolean.TRUE; return Boolean.TRUE;
}) })
.then(Mono.empty())); .then(Mono.empty()));