getId() {
return Optional.ofNullable(message.properties().getMessageId());
}
- public String getQueueName() {
- return incomingConfiguration.getQueueName();
- }
-
/**
* The exchange the message was delivered to.
*
@@ -316,8 +309,4 @@ public String getRoutingKey() {
public boolean isRedeliver() {
return message.envelope().isRedeliver();
}
-
- public boolean isTracingEnabled() {
- return incomingConfiguration.getTracingEnabled();
- }
}
diff --git a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQConnector.java b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQConnector.java
index 12ce13663a..0057d07e61 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQConnector.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQConnector.java
@@ -1,5 +1,6 @@
package io.smallrye.reactive.messaging.rabbitmq;
+import static io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation.RECEIVE;
import static io.smallrye.reactive.messaging.annotations.ConnectorAttribute.Direction.INCOMING;
import static io.smallrye.reactive.messaging.annotations.ConnectorAttribute.Direction.INCOMING_AND_OUTGOING;
import static io.smallrye.reactive.messaging.annotations.ConnectorAttribute.Direction.OUTGOING;
@@ -12,6 +13,7 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
+import javax.annotation.PostConstruct;
import javax.annotation.Priority;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.BeforeDestroyed;
@@ -34,6 +36,12 @@
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.impl.CredentialsProvider;
+import io.opentelemetry.api.GlobalOpenTelemetry;
+import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
+import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
+import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor;
+import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesGetter;
+import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingSpanNameExtractor;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.tuples.Tuple2;
@@ -48,6 +56,10 @@
import io.smallrye.reactive.messaging.rabbitmq.fault.RabbitMQFailStop;
import io.smallrye.reactive.messaging.rabbitmq.fault.RabbitMQFailureHandler;
import io.smallrye.reactive.messaging.rabbitmq.fault.RabbitMQReject;
+import io.smallrye.reactive.messaging.rabbitmq.tracing.RabbitMQTrace;
+import io.smallrye.reactive.messaging.rabbitmq.tracing.RabbitMQTraceAttributesExtractor;
+import io.smallrye.reactive.messaging.rabbitmq.tracing.RabbitMQTraceTextMapGetter;
+import io.smallrye.reactive.messaging.tracing.TracingUtils;
import io.vertx.core.json.JsonObject;
import io.vertx.mutiny.core.Vertx;
import io.vertx.mutiny.rabbitmq.RabbitMQClient;
@@ -141,7 +153,7 @@ public class RabbitMQConnector implements IncomingConnectorFactory, OutgoingConn
private enum ChannelStatus {
CONNECTED,
NOT_CONNECTED,
- INITIALISING
+ INITIALISING;
}
// The list of RabbitMQClient's currently managed by this connector
@@ -166,6 +178,8 @@ private enum ChannelStatus {
@Any
Instance credentialsProviders;
+ private Instrumenter instrumenter;
+
RabbitMQConnector() {
// used for proxies
}
@@ -174,6 +188,19 @@ public static String getExchangeName(final RabbitMQConnectorCommonConfiguration
return config.getExchangeName().map(s -> "\"\"".equals(s) ? "" : s).orElse(config.getChannel());
}
+ @PostConstruct
+ void init() {
+ RabbitMQTraceAttributesExtractor rabbitMQAttributesExtractor = new RabbitMQTraceAttributesExtractor();
+ MessagingAttributesGetter messagingAttributesGetter = rabbitMQAttributesExtractor
+ .getMessagingAttributesGetter();
+ InstrumenterBuilder builder = Instrumenter.builder(GlobalOpenTelemetry.get(),
+ "io.smallrye.reactive.messaging", MessagingSpanNameExtractor.create(messagingAttributesGetter, RECEIVE));
+
+ instrumenter = builder.addAttributesExtractor(rabbitMQAttributesExtractor)
+ .addAttributesExtractor(MessagingAttributesExtractor.create(messagingAttributesGetter, RECEIVE))
+ .buildConsumerInstrumenter(RabbitMQTraceTextMapGetter.INSTANCE);
+ }
+
private Multi extends Message>> getStreamOfMessages(
RabbitMQConsumer receiver,
ConnectionHolder holder,
@@ -181,9 +208,22 @@ private Multi extends Message>> getStreamOfMessages(
RabbitMQFailureHandler onNack,
RabbitMQAckHandler onAck) {
- log.receiverListeningAddress(ic.getQueueName());
-
- return receiver.toMulti().map(m -> new IncomingRabbitMQMessage<>(m, holder, onNack, onAck, ic));
+ final String queueName = ic.getQueueName();
+ final boolean isTracingEnabled = ic.getTracingEnabled();
+ final String contentTypeOverride = ic.getContentTypeOverride().orElse(null);
+ log.receiverListeningAddress(queueName);
+
+ return receiver.toMulti()
+ .map(m -> new IncomingRabbitMQMessage<>(m, holder, onNack, onAck, contentTypeOverride))
+ .plug(m -> {
+ if (isTracingEnabled) {
+ return m.map(msg -> {
+ TracingUtils.traceIncoming(instrumenter, msg, RabbitMQTrace.trace(queueName, msg.getHeaders()));
+ return msg;
+ });
+ }
+ return m;
+ });
}
/**
diff --git a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMessageConverter.java b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMessageConverter.java
index 0df45d3768..6e34fa7c41 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMessageConverter.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMessageConverter.java
@@ -16,7 +16,7 @@
import io.netty.handler.codec.http.HttpHeaderValues;
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.smallrye.reactive.messaging.rabbitmq.tracing.RabbitMQTrace;
-import io.smallrye.reactive.messaging.rabbitmq.tracing.TracingUtils;
+import io.smallrye.reactive.messaging.tracing.TracingUtils;
import io.vertx.core.json.Json;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
@@ -78,7 +78,7 @@ public static OutgoingRabbitMQMessage convert(
if (isTracingEnabled) {
// Create a new span for the outbound message and record updated tracing information in
// the headers; this has to be done before we build the properties below
- TracingUtils.createOutgoingTrace(instrumenter, message, sourceHeaders, exchange);
+ TracingUtils.traceOutgoing(instrumenter, message, RabbitMQTrace.trace(exchange, sourceHeaders));
}
// Reconstruct the properties from the source, except with the (possibly) modified headers;
@@ -120,7 +120,7 @@ public static OutgoingRabbitMQMessage convert(
if (isTracingEnabled) {
// Create a new span for the outbound message and record updated tracing information in
// the message headers; this has to be done before we build the properties below
- TracingUtils.createOutgoingTrace(instrumenter, message, metadata.getHeaders(), exchange);
+ TracingUtils.traceOutgoing(instrumenter, message, RabbitMQTrace.trace(exchange, metadata.getHeaders()));
}
final Date timestamp = (metadata.getTimestamp() != null) ? Date.from(metadata.getTimestamp().toInstant()) : null;
diff --git a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/RabbitMQTracingSubscriberDecorator.java b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/RabbitMQTracingSubscriberDecorator.java
deleted file mode 100644
index 1953d29c58..0000000000
--- a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/RabbitMQTracingSubscriberDecorator.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package io.smallrye.reactive.messaging.rabbitmq.tracing;
-
-import static io.opentelemetry.instrumentation.api.instrumenter.messaging.MessageOperation.RECEIVE;
-
-import java.util.List;
-import java.util.Optional;
-
-import javax.enterprise.context.ApplicationScoped;
-
-import org.eclipse.microprofile.reactive.messaging.Message;
-
-import io.opentelemetry.api.GlobalOpenTelemetry;
-import io.opentelemetry.context.Context;
-import io.opentelemetry.context.Scope;
-import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
-import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
-import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor;
-import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesGetter;
-import io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingSpanNameExtractor;
-import io.smallrye.mutiny.Multi;
-import io.smallrye.reactive.messaging.SubscriberDecorator;
-import io.smallrye.reactive.messaging.TracingMetadata;
-import io.smallrye.reactive.messaging.rabbitmq.IncomingRabbitMQMetadata;
-
-@ApplicationScoped
-public class RabbitMQTracingSubscriberDecorator implements SubscriberDecorator {
- private final Instrumenter instrumenter;
-
- public RabbitMQTracingSubscriberDecorator() {
- RabbitMQTraceAttributesExtractor rabbitMQAttributesExtractor = new RabbitMQTraceAttributesExtractor();
- MessagingAttributesGetter messagingAttributesGetter = rabbitMQAttributesExtractor
- .getMessagingAttributesGetter();
- InstrumenterBuilder builder = Instrumenter.builder(GlobalOpenTelemetry.get(),
- "io.smallrye.reactive.messaging", MessagingSpanNameExtractor.create(messagingAttributesGetter, RECEIVE));
-
- instrumenter = builder.addAttributesExtractor(rabbitMQAttributesExtractor)
- .addAttributesExtractor(MessagingAttributesExtractor.create(messagingAttributesGetter, RECEIVE))
- .buildConsumerInstrumenter(RabbitMQTraceTextMapGetter.INSTANCE);
- }
-
- @Override
- public Multi extends Message>> decorate(
- final Multi extends Message>> toBeSubscribed,
- final List channelName,
- final boolean isConnector) {
- return toBeSubscribed.onItem().transform(this::traceMessage);
- }
-
- private Message> traceMessage(final Message> message) {
- Optional incomingRabbitMQMetadata = message.getMetadata().get(IncomingRabbitMQMetadata.class);
- if (incomingRabbitMQMetadata.isEmpty()) {
- return message;
- }
-
- IncomingRabbitMQMetadata metadata = incomingRabbitMQMetadata.get();
- if (!metadata.isTracingEnabled()) {
- // TODO - We can optimize this and not even create the bean?
- return message;
- }
-
- TracingMetadata tracingMetadata = TracingMetadata.fromMessage(message).orElse(TracingMetadata.empty());
- RabbitMQTrace trace = RabbitMQTrace.trace(metadata.getQueueName(), metadata.getHeaders());
-
- Context parentContext = tracingMetadata.getPreviousContext();
- if (parentContext == null) {
- parentContext = Context.current();
- }
- Context spanContext;
- Scope scope = null;
-
- boolean shouldStart = instrumenter.shouldStart(parentContext, trace);
- if (shouldStart) {
- try {
- spanContext = instrumenter.start(parentContext, trace);
- scope = spanContext.makeCurrent();
- instrumenter.end(spanContext, trace, null, null);
- return message.addMetadata(TracingMetadata.with(spanContext, parentContext));
- } finally {
- if (scope != null) {
- scope.close();
- }
- }
- }
-
- return message;
- }
-}
diff --git a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/TracingUtils.java b/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/TracingUtils.java
deleted file mode 100644
index cfd8a48c69..0000000000
--- a/smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/tracing/TracingUtils.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package io.smallrye.reactive.messaging.rabbitmq.tracing;
-
-import java.util.Map;
-import java.util.Optional;
-
-import org.eclipse.microprofile.reactive.messaging.Message;
-
-import io.opentelemetry.context.Context;
-import io.opentelemetry.context.Scope;
-import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
-import io.smallrye.reactive.messaging.TracingMetadata;
-
-/**
- * Utility methods to manage spans for incoming and outgoing messages.
- */
-public abstract class TracingUtils {
- /**
- * Private constructor to prevent instantiation.
- */
- private TracingUtils() {
- }
-
- public static void createOutgoingTrace(
- final Instrumenter instrumenter,
- final Message> msg,
- final Map headers,
- final String exchange) {
-
- Optional tracingMetadata = TracingMetadata.fromMessage(msg);
- RabbitMQTrace message = RabbitMQTrace.trace(exchange, headers);
-
- Context parentContext = tracingMetadata.map(TracingMetadata::getCurrentContext).orElse(Context.current());
- Context spanContext;
- Scope scope = null;
-
- boolean shouldStart = instrumenter.shouldStart(parentContext, message);
- if (shouldStart) {
- try {
- spanContext = instrumenter.start(parentContext, message);
- scope = spanContext.makeCurrent();
- instrumenter.end(spanContext, message, null, null);
- } finally {
- if (scope != null) {
- scope.close();
- }
- }
- }
- }
-}
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/ConsumptionBean.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/ConsumptionBean.java
index a4acb56f20..71b19771f0 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/ConsumptionBean.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/ConsumptionBean.java
@@ -25,7 +25,7 @@ public class ConsumptionBean {
@Incoming("data")
@Outgoing("sink")
@Acknowledgment(Acknowledgment.Strategy.MANUAL)
- public Message process(IncomingRabbitMQMessage input) {
+ public Message process(Message input) {
int value = -1;
try {
value = Integer.parseInt(input.getPayload());
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMessageTest.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMessageTest.java
index aceceb1b01..976b6922fd 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMessageTest.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMessageTest.java
@@ -5,7 +5,6 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
@@ -46,13 +45,12 @@ public void testDoubleAckBehavior() {
when(mockMsg.envelope()).thenReturn(new Envelope(13456, false, "test", "test"));
RabbitMQMessage msg = RabbitMQMessage.newInstance(mockMsg);
- RabbitMQConnectorIncomingConfiguration incomingConfiguration = mock(RabbitMQConnectorIncomingConfiguration.class);
- when(incomingConfiguration.getContentTypeOverride()).thenReturn(Optional.of("text/plain"));
-
Exception nackReason = new Exception("test");
- IncomingRabbitMQMessage ackMsg = new IncomingRabbitMQMessage<>(msg, mock(ConnectionHolder.class), doNothingNack,
- doNothingAck, incomingConfiguration);
+ IncomingRabbitMQMessage ackMsg = new IncomingRabbitMQMessage<>(msg, mock(ConnectionHolder.class),
+ doNothingNack,
+ doNothingAck,
+ "text/plain");
assertDoesNotThrow(() -> ackMsg.ack().toCompletableFuture().get());
assertDoesNotThrow(() -> ackMsg.ack().toCompletableFuture().get());
@@ -67,13 +65,12 @@ public void testDoubleNackBehavior() {
when(mockMsg.envelope()).thenReturn(new Envelope(13456, false, "test", "test"));
RabbitMQMessage msg = RabbitMQMessage.newInstance(mockMsg);
- RabbitMQConnectorIncomingConfiguration incomingConfiguration = mock(RabbitMQConnectorIncomingConfiguration.class);
- when(incomingConfiguration.getContentTypeOverride()).thenReturn(Optional.of("text/plain"));
-
Exception nackReason = new Exception("test");
IncomingRabbitMQMessage nackMsg = new IncomingRabbitMQMessage<>(msg, mock(ConnectionHolder.class),
- doNothingNack, doNothingAck, incomingConfiguration);
+ doNothingNack,
+ doNothingAck,
+ "text/plain");
assertDoesNotThrow(() -> nackMsg.nack(nackReason).toCompletableFuture().get());
assertDoesNotThrow(() -> nackMsg.nack(nackReason).toCompletableFuture().get());
@@ -88,11 +85,9 @@ void testConvertPayload() {
when(mockMsg.envelope()).thenReturn(new Envelope(13456, false, "test", "test"));
RabbitMQMessage msg = RabbitMQMessage.newInstance(mockMsg);
- RabbitMQConnectorIncomingConfiguration incomingConfiguration = mock(RabbitMQConnectorIncomingConfiguration.class);
- when(incomingConfiguration.getContentTypeOverride()).thenReturn(Optional.of("text/plain"));
-
IncomingRabbitMQMessage incomingRabbitMQMessage = new IncomingRabbitMQMessage<>(msg,
- mock(ConnectionHolder.class), doNothingNack, doNothingAck, incomingConfiguration);
+ mock(ConnectionHolder.class),
+ doNothingNack, doNothingAck, "text/plain");
assertThat(incomingRabbitMQMessage.getPayload()).isEqualTo("payload");
}
@@ -107,11 +102,9 @@ void testConvertPayloadJsonObject() {
when(mockMsg.envelope()).thenReturn(new Envelope(13456, false, "test", "test"));
RabbitMQMessage msg = RabbitMQMessage.newInstance(mockMsg);
- RabbitMQConnectorIncomingConfiguration incomingConfiguration = mock(RabbitMQConnectorIncomingConfiguration.class);
- when(incomingConfiguration.getContentTypeOverride()).thenReturn(Optional.empty());
-
IncomingRabbitMQMessage incomingRabbitMQMessage = new IncomingRabbitMQMessage<>(msg,
- mock(ConnectionHolder.class), doNothingNack, doNothingAck, incomingConfiguration);
+ mock(ConnectionHolder.class),
+ doNothingNack, doNothingAck, null);
assertThat(incomingRabbitMQMessage.getPayload()).isEqualTo(payload);
}
@@ -125,12 +118,9 @@ void testConvertPayloadFallback() {
when(mockMsg.envelope()).thenReturn(new Envelope(13456, false, "test", "test"));
RabbitMQMessage msg = RabbitMQMessage.newInstance(mockMsg);
- RabbitMQConnectorIncomingConfiguration incomingConfiguration = mock(RabbitMQConnectorIncomingConfiguration.class);
- when(incomingConfiguration.getContentTypeOverride()).thenReturn(Optional.empty());
-
IncomingRabbitMQMessage incomingRabbitMQMessage = new IncomingRabbitMQMessage<>(msg,
mock(ConnectionHolder.class),
- doNothingNack, doNothingAck, incomingConfiguration);
+ doNothingNack, doNothingAck, null);
assertThat(((Message) ((Message) incomingRabbitMQMessage)).getPayload()).isEqualTo(payloadBuffer.getBytes());
}
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMetadataTest.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMetadataTest.java
index b9e9ef2279..9faa2a87c4 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMetadataTest.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/IncomingRabbitMQMetadataTest.java
@@ -1,12 +1,10 @@
package io.smallrye.reactive.messaging.rabbitmq;
-import static org.junit.jupiter.api.Assertions.*;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+import org.junit.Assert;
import org.junit.jupiter.api.Test;
import com.rabbitmq.client.BasicProperties;
@@ -25,15 +23,15 @@ public void testHeaderWithNullValue() {
DummyRabbitMQMessage message = new DummyRabbitMQMessage(new DummyBasicProperties(properties));
- IncomingRabbitMQMetadata incomingRabbitMQMetadata = new IncomingRabbitMQMetadata(message, null);
+ IncomingRabbitMQMetadata incomingRabbitMQMetadata = new IncomingRabbitMQMetadata(message);
- assertEquals("value1", incomingRabbitMQMetadata.getHeaders().get("header1"));
- assertTrue(incomingRabbitMQMetadata.getHeaders().containsKey("header2"));
- assertNull(incomingRabbitMQMetadata.getHeaders().get("header2"));
+ Assert.assertEquals("value1", incomingRabbitMQMetadata.getHeaders().get("header1"));
+ Assert.assertTrue(incomingRabbitMQMetadata.getHeaders().containsKey("header2"));
+ Assert.assertNull(incomingRabbitMQMetadata.getHeaders().get("header2"));
}
- static class DummyRabbitMQMessage implements RabbitMQMessage {
+ class DummyRabbitMQMessage implements RabbitMQMessage {
protected BasicProperties properties;
DummyRabbitMQMessage(BasicProperties properties) {
@@ -66,7 +64,7 @@ public Integer messageCount() {
}
}
- static class DummyBasicProperties implements BasicProperties {
+ class DummyBasicProperties implements BasicProperties {
protected Map headers;
DummyBasicProperties(Map headers) {
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMetadataTest.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMetadataTest.java
index 5be9b0f7ed..37c3daccbc 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMetadataTest.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQMetadataTest.java
@@ -66,7 +66,7 @@ public Integer messageCount() {
}
};
- IncomingRabbitMQMetadata incoming = new IncomingRabbitMQMetadata(message, null);
+ IncomingRabbitMQMetadata incoming = new IncomingRabbitMQMetadata(message);
assertThat(incoming.getUserId()).isEqualTo(Optional.of("test-user"));
assertThat(incoming.getAppId()).isEqualTo(Optional.of("tests"));
assertThat(incoming.getContentType()).isEqualTo(Optional.of("text/plain"));
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/TracingTest.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/TracingTest.java
index c5d7d5e012..25d88134b4 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/TracingTest.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/TracingTest.java
@@ -47,7 +47,6 @@
import io.opentelemetry.sdk.trace.samplers.Sampler;
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
import io.smallrye.reactive.messaging.providers.connectors.InMemorySource;
-import io.smallrye.reactive.messaging.rabbitmq.tracing.RabbitMQTracingSubscriberDecorator;
public class TracingTest extends WeldTestBase {
private SdkTracerProvider tracerProvider;
@@ -69,8 +68,6 @@ public void openTelemetry() {
.setPropagators(ContextPropagators.create(W3CTraceContextPropagator.getInstance()))
.setTracerProvider(tracerProvider)
.buildAndRegisterGlobal();
-
- addBeans(RabbitMQTracingSubscriberDecorator.class);
}
@Test
diff --git a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/WeldTestBase.java b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/WeldTestBase.java
index 79953f3084..8fd733c7e6 100644
--- a/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/WeldTestBase.java
+++ b/smallrye-reactive-messaging-rabbitmq/src/test/java/io/smallrye/reactive/messaging/rabbitmq/WeldTestBase.java
@@ -14,7 +14,6 @@
import io.smallrye.config.inject.ConfigExtension;
import io.smallrye.reactive.messaging.providers.MediatorFactory;
-import io.smallrye.reactive.messaging.providers.OutgoingInterceptorDecorator;
import io.smallrye.reactive.messaging.providers.connectors.ExecutionHolder;
import io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry;
import io.smallrye.reactive.messaging.providers.extension.ChannelProducer;
@@ -70,7 +69,6 @@ public void initWeld() {
weld.addBeanClass(MetricDecorator.class);
weld.addBeanClass(MicrometerDecorator.class);
weld.addBeanClass(ContextDecorator.class);
- weld.addBeanClass(OutgoingInterceptorDecorator.class);
weld.disableDiscovery();
}