Skip to content

Dapr pubsub subscriber issue #743

@Venkat1188

Description

@Venkat1188

@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"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions