You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After learning and trying writing apps with method chaining with @Incoming and @Outgoing, I notice two things:
when returning Uni<some-payload> after performing an async operation, by default it concat the publishers (like transformToUniAndAconcat() from mutiny) and by that keeping the order which makes sense for me for default behavior.
In sync operation I can set the @Blocking(ordered=false) and by that make those operations run in parallel on worker threads without blocking the i/o threads in case the order of the operation is not matter.
I was wondering why I can't do the same with async operations with something like @NonBlocking(ordered = false) which will act like the transfrormToUniAndMerge() in mutiny.
With good documentation, I think that it will help to easily use this potential of concurrency async calls to make the application more efficient in case the order is not matter. In addition, I'll be able to use the automatic metadata propagation feature and remove the code that creates a new message with the input message metadata in case only the payload change.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
After learning and trying writing apps with method chaining with
@Incoming
and@Outgoing
, I notice two things:when returning
Uni<some-payload>
after performing an async operation, by default it concat the publishers (liketransformToUniAndAconcat()
from mutiny) and by that keeping the order which makes sense for me for default behavior.In sync operation I can set the
@Blocking(ordered=false)
and by that make those operations run in parallel on worker threads without blocking the i/o threads in case the order of the operation is not matter.I was wondering why I can't do the same with async operations with something like
@NonBlocking(ordered = false)
which will act like thetransfrormToUniAndMerge()
in mutiny.currently, I achieve that by doing this:
That theoretically could be:
With good documentation, I think that it will help to easily use this potential of concurrency async calls to make the application more efficient in case the order is not matter. In addition, I'll be able to use the automatic metadata propagation feature and remove the code that creates a new message with the input message metadata in case only the payload change.
what are your thoughts about this?
Beta Was this translation helpful? Give feedback.
All reactions