-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No messages emitted on start of smallrye-reactive-messaging-kafka codestart in dev mode #23018
Comments
/cc @Ladicek, @cescoffier, @ia3andy, @jmartisk, @michalszynkiewicz, @ozangunalp, @phillip-kruger, @quarkusio/devtools, @radcortez |
Ok... that's annoying... Here is the working configuration:
I would also recommend using the topic as channel name to reduce the configuration to:
That would be so much better... However, I don't know where this codestart is maintained. @maxandersen / @gastaldi any link? |
We may want to rewrite the tests too, to use the dev service and not the in-memory connector. |
I think I found where is it maintained... but I got some weird YAML-based config - do we generate the properties from that Yaml? |
Yes, I believe so |
Ah, I got why it's done that way (with the topic set). While I believe I agreed with this, I think it is not OK. It shows what I would call an anti-pattern for simple applications (read/write to the same topic from the same application instead of using an in-memory stream). It can be useful when you want to implement checkpoints, but that's quite advanced and should not be covered by the code start. |
They could not work as they were implemented. This PR simplifies the app and config and remote the MQTT code start. Fix quarkusio#23018
They could not work as they were implemented. This PR simplifies the app and config and remote the MQTT code start. Fix quarkusio#23018 (cherry picked from commit d84d9e8)
Describe the bug
No messages emitted on start with
smallrye-reactive-messaging-kafka
codestart in dev mode.I had to adjust JAX-RS endpoint to inject
MyReactiveMessagingApplication
and invoke the method with emitter as part of endpoint call. When I accessed the endpoint I finally saw the log messages with the upper-case text.Application code: https://github.com/quarkusio/quarkus/blob/main/devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/extension-codestarts/reactive-messaging-codestart/java/src/main/java/org/acme/MyReactiveMessagingApplication.java#L19
In the log I noticed new lines just before the upper-case prints:
Seems that kafka dev service is not fully or properly initialized to handle messages sent from
onStart
methodThis behaviour is quite confusing and it took me some time to figure out that the code flow in
MyReactiveMessagingApplication
is correct and the problem is with message sending.CC @cescoffier
Expected behavior
gets printed on boot in dev mode
Actual behavior
Upper-case text is not printed
How to Reproduce?
mvn quarkus:dev
Output of
uname -a
orver
macOS Monterey
Output of
java -version
Java 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.2.Final and Quarkus main
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: