-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reactive Messaging: Tombstone-messages no longer accepted #31003
Comments
/cc @cescoffier (reactive-messaging), @ozangunalp (reactive-messaging) |
Ourf, nice catch.... @ozangunalp can you have a look? |
There is an immediate workaround to use message payload as @cescoffier maybe the definitive fix is to remove the payload null check in |
@ozangunalp they come from the spec... |
I can't find it in the spec. The TCK doesn't check for it. |
Hum... ok, then, let's remove the checks. |
@ozangunalp Do you have any expectation in which future release this will be fixed? I've seen the proposed workaround, but we are using |
I can understand that. I need to do more checks before going through with the change. I'll get back to you here at the end of the day. |
@ozangunalp let me know if there is something I should backport (or if we need a PR specific to 2.16). Thanks. |
@ozangunalp wasn't that one fixed? |
On main yes. I need to see what we include to the backport release. |
@ozangunalp The referenced PR was closed, because the risk was considered too high. What does this mean regarding this issue? Will it not be fixed until release 3? |
For sure, it will be in Quarkus 3. |
It is already merged into the Quarkus main branch, so will be in Quarkus 3. |
There is a need from our side, because we would be stuck on 2.13 until 3 is out. But of course I'm not sure if this need is big enough if we are the only ones... 😉 |
The workaround working in 2.16 version. :-) import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import org.eclipse.microprofile.reactive.messaging.Channel;
import org.eclipse.microprofile.reactive.messaging.Emitter;
import org.eclipse.microprofile.reactive.messaging.Message;
import io.smallrye.reactive.messaging.kafka.Record;
import io.smallrye.reactive.messaging.kafka.api.OutgoingKafkaRecordMetadata;
@ApplicationScoped
public class EmitterTester<K, V> {
@Inject
@Channel("emitterTest")
protected Emitter<Record<K,V>> emitterToGenericPersistence;
public void send(String topic, K key, V value) {
OutgoingKafkaRecordMetadata<Object> metadata = OutgoingKafkaRecordMetadata.builder()
.withTopic(topic)
.withKey(key) //JsonSerializer
.build();
//https://github.com/quarkusio/quarkus/issues/31003
//payload not null
Message<Record<K,V>> message = Message.of(Record.of(key, value)).addMetadata(metadata);
emitterToGenericPersistence.send(message);
}
} |
Describe the bug
Since Quarkus 2.14.0.Final, I can no longer send messages with
null
-value over theEmitter
. I get this exception:As far as I can see, this happens since
ReactiveMessagingTracingDecorator
was introduced. This class tries to add a header and therefore rebuilds the message.Expected behavior
It should be possible to send messages with
null
-value (tombstone-messages).Actual behavior
It is not possible to send tombstone-messages.
How to Reproduce?
Reproducer:
empty-value-reproducer.zip
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19044.2006]
Output of
java -version
OpenJDK Runtime Environment Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6
Additional information
No response
The text was updated successfully, but these errors were encountered: