smallrye-reactive-messaging
smallrye-reactive-messaging copied to clipboard
'Targeted' does not support null values
NullPointerException is thrown when trying to create Targeted with null value.
@Incoming("in")
@Outgoing("out1")
@Outgoing("out2")
public Targeted process(Double price) {
return Targeted.of("out1", price)
}
It is a common case when we want to delete some item from channel using null value. Default Targeted implementation should support null values.
The underlying map for the implementation doesn't support null keys and values, that's why you are having the NPE.
While I agree that null values can be supported, if, for example in case of Kafka, you'd like to send a tombstone, you'd like to send a key and a null value, instead of only a null value.