Except indicated otherwise, Mutiny invokes the next stage using the thread emitting the event from upstream.
So, in the following code, the transform stage is invoked from the thread emitting the event.
Uni<String>uni=Uni.createFrom().<String>emitter(emitter->newThread(()->emitter.complete("hello from "+Thread.currentThread().getName())).start()).onItem().transform(item->{// Called on the emission thread.returnitem.toUpperCase();});
You can switch to another thread using the emitOn operator.
The emitOn operator lets you switch the thread used to dispatch (upstream -> downstream) events, so items, failure and completion events.
Just pass the executor you want to use.