I try to learn reactive programming / reactive messaging with QUARKUS and SmallRye. But I still have some trouble to understand the advantages of org.eclipse.microprofile.reactive.messaging over javax.enterprise.event, if there is ?
On one side :
@Inject
MyEvent Event<String> myEvent;
public void someFunc(){
myEvent.fire("blabla");
}
//Elsewhere in the code :
public void aConsumer(@Observes @MyEvent String ev){
//an event saying blabla has been received :)
}
On the other side :
@Inject
@Channel("myChannel")
Emitter<String> msgEmitter;
public void someFunc(){
msgEmitter.send("blabla");
}
//Elsewhere in the code :
@Incoming("myChannel")
public void aConsumer(String ev){
//an event saying blabla has been received :)
}
I may miss something ....