Skip to content
Discussion options

You must be logged in to vote

I didn't get what was your exact question, but I'll explain here the difference between the 2 methods.

transform does a synchronous transformation, and you should use it for anything that does not have I/O involved.

transformToUni should be used when you want to chain the processing with an operation that does some async I/O.

For instance if operation A gives you an object foo:

  • use transform if you do something like foo -> foo.getName()
  • use transformToUni if you do something like foo -> db.insert(foo).

See https://smallrye.io/smallrye-mutiny/getting-started/transforming-items and https://smallrye.io/smallrye-mutiny/getting-started/transforming-items-async

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ichrist-gr
Comment options

Answer selected by jponge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants