Eric Deandrea
Java Champion
Senior Principal Software Engineer
Quarkus | LangChain4j | Docling-Java
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CAL%3DE%3DjRoDB1f13SydXUHViUzYeRcctkiS4upmWaVMttgFx5pjA%40mail.gmail.com.
Eric Deandrea
Java Champion
Senior Principal Software Engineer
Quarkus | LangChain4j | Docling-Java
Hi Bill,
that's a very good question. From my point of view, it's not a bad
pattern per se. But it's more about whether you want to notify the
observers synchronously, blocking the current thread, or asynchronously,
offloaded to another thread. In many cases, you probably only need one
or the other.
For example, we fire the HttpServerStart [1] event asynchronously,
because we don't want to block the HTTP server from starting. On the
other hand, the StartupEvent [2] is fired synchronously because we want
to block the start of the application until all startup logic is finished.'
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/872ea557-4bcd-4d9f-b2a7-954ed2d860fa%40redhat.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CAOTfCRWWueCNnTfoch6rB-dJh0-q6FjaeuCN8nT-nEK%2BzuuO0A%40mail.gmail.com.
Chris Cranford
Principal Software Engineer
APIs, Events, & Integration - Debezium
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/601ccb89-04a6-4499-985d-07415c75490d%40redhat.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/601ccb89-04a6-4499-985d-07415c75490d%40redhat.com.
Eric Deandrea
Java Champion
Senior Principal Software Engineer
Quarkus | LangChain4j | Docling-Java
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/da4a3eb9-c777-4a1c-b70d-cf8a09ebc677%40redhat.com.
Eric Deandrea
Java Champion
Senior Principal Software Engineer
Quarkus | LangChain4j | Docling-Java
On 5/29/26 17:00, 'Eric Deandrea' via Quarkus Development mailing list
wrote:Bill and I are just trying to think of the best solution for our use case.In some instances, the flow should be synchronous, but in others itshould be async. So maybe the better approach is just fire sync and theconsumer can do the threading themselves if they want async.
But if the flow should be async then you can't leave it to the
consumers. That does not make sense.
Not that it matters, but in Spring this is not an issue. The producerjust fires the event. It’s up to each consumer to decide whether theywant to receive it sync or async. You can even have multiple consumersof the event that handle it differently.
One of the consequence is that for sync notifications you don't need to
care about concurrent access for mutable payload. If you have immutable
payload (best practice IMO) then you don't care obviously.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/c47c95b0-d8a8-4989-98d8-def4af117ab6%40redhat.com.
Eric Deandrea
Java Champion
Senior Principal Software Engineer
Quarkus | LangChain4j | Docling-Java
@Observe the event and then receive it either sync or async depending on how it’s fired?To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/0f6d1112-293a-40d3-aed2-a64280d4ca81%40redhat.com.
I know we’re talking about something thats been around for a while 🙂 But it’s new to me and just doesn’t feel right. It feels like there is an unnecessary code-level coupling between the producers and the consumers. The point of event firing is to decouple the producers and consumers.