@Incoming("from-processor-to-consumer")
public Multi<Void> consume(Multi<String> stream) {
return stream.onItem()
.invoke(msg -> {
log.infof("consumer received %s", msg);
})
.onItem()
.ignore();
}
When running this method raises the ClassCastException
:
consume has thrown an exception: java.lang.ClassCastException: class java.lang.String cannot be cast to class io.smallrye.mutiny.Multi
Can I consume Multi<String>
?
Looking at the SmallRye Reactive Messaging > Development Model > Consuming Payloads it seems I can only consume one message at time.