Replies: 2 comments 3 replies
-
Hi, Quarkus 2.15.0 ships with an old version of Mutiny.
Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, it would be better to reason in pure Mutiny APIs and not involve databases and stuff |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an application using Quarkus 2.15.0 and its primary purpose is to consume a Kafka event and then call Rest clients to populate information in Mongo. My requirement is to call three Rest clients, let's call them RestA, RestB and RestC.
The Kafka message contains ids which are streamed using MultiEmitter like this:
processParties method calls RestA, updates the database with the information and then calls RestB and RestC concurrently. The Rest calls depends on the number of ids, so if there are 10 then the Rest clients are called 10 times. The code is kinda like this
The processRestBAndRestC method looks kinda like this. It calls RestB and RestC and updates the db with the info received. I'm using Uni.join so I can execute them concurrently and since they both have the same method signature.
I hope this rudimentary code highlights what I'm trying to do, basically my issue comes when I call transformToUniAndMerge(account -> processRestBAndRestC(id, anotherId, (Account) account)). It sometimes doesn't update the db with the info and sometimes does. If I switch to using transformToUniAndConcatenate it works perfectly fine but its slower cause it waits for the Uni to complete before moving onto the next item and I don't necessarily care about preserving the order. I just want it to consistently update the Db with all the info no matter the order I receive the data in.
Is there any way I can use the merge and get rid off the inconsistencies in my db update operations? Maybe I'm doing something wrong so would appreciate any guidance
Beta Was this translation helpful? Give feedback.
All reactions