Quarkus Reactive Messaging - broadcast incoming kafka messages to websocket #41246
Unanswered
PanayiotisMilios
asked this question in
Q&A
Replies: 1 comment
-
/cc @alesj (kafka), @cescoffier (kafka,reactive-messaging), @ozangunalp (kafka,reactive-messaging) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I've implemented an application that consumes kafka messages from a topic and broadcasts them to web-clients that are connected to my app with websocket.
In my
KafkaConsumer
class, I'm injecting myWebSocketServer
object and in my@Incoming
method that consumes the Kafka messages, I'm calling a broadcast method that i've implemented in theWebSocketServer
to send the message to all connected clients.My broadcast method looks like this:
And my Kafka consuming method looks like this
I'm very new to the reactive concept and thus my question is whether what i'm doing defeats the whole purpose of reactive? Will the broadcast method block the event pool of threads. Is there any way to improve my implementation?
Beta Was this translation helpful? Give feedback.
All reactions