-
Notifications
You must be signed in to change notification settings - Fork 224
Description
@Topic(name = "testingtopic", pubsubName = "messagebus")
@PostMapping(path = "/testingtopic")
public Mono handleMessage(@RequestBody(required = false) CloudEvent cloudEvent) {
return Mono.fromRunnable(
() -> {
try {
System.out.println("Subscriber got: " + cloudEvent.getData());
System.out.println("Subscriber got: " + OBJECT_MAPPER.writeValueAsString(cloudEvent));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
});
getting an nullpointer exception on reading cloudEvent.getData(),
On dapr sidecar logs,I can see
{"app_id":"dpar-subscribe","instance":"dpar-subscribe-6d4cb75df7-5z7ph","level":"debug","msg":"user app did not subscribe to any topic","scope":"dapr.runtime","time":"2022-05-18T07:29:05.621296104Z","type":"log","ver":"1.7.2"}