Closed JamieCressey closed 4 years ago
Hi @JamieCressey, I'm will have a look at this issue. Can you maybe provide me a little example project?
I managed to figure it out. The consumer was defined as a private method, making it public fixed the problem.
From;
@Subject("TopicName")
private void schoolEvent(String event) {
log.info("New event: {}", event);
}
To;
@Subject("TopicName")
public void schoolEvent(String event) {
log.info("New event: {}", event);
}
I have a publisher which looks like;
By enabling debug logging I can see messages successfully being published. Attaching a python consumer to the topic also validates messages are correctly being published and can be consumed.
Python sample code;
However, I do not receive any messages when I attempt to consumer them in Micronaut using the following code;
With debug logging enabled I do not see the MessageListener class being created. Annotating the class with
@Context
creates an instance of the class, but still nothing is received.My Maven build config was auto-generated by the Micronaut CLI and looks like this;