-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)theme: observabilityAn issue related to observability and tracingAn issue related to observability and tracingtype: bugA general bugA general bug
Milestone
Description
When using @JmsListener that is configured with an ObservationRegistry can see that the ObservationRegistry is used for the incoming message but not utilized for the outgoing response message. Specifically, the 'traceparent' header is not included in the response. This was using Spring JMS 6.1.10 via Spring Boot 3.3.1.
A simple workout in the meantime is to explicitly use a JmsTemplate configured with ObservationRegistry to send a response.
@Bean
DefaultJmsListenerContainerFactory jmsContainerFactory(ConnectionFactory connectionFactory, ObservationRegistry registry) {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(connectionFactory)
factory.setObservationRegistry(registry);
return factory;
}
@JmsListener("someQueue")
Message<String> handleMessage(Message message) {
// Do stuff
return MessageBuilder.withPayload("test").build();
}
Metadata
Metadata
Assignees
Labels
in: messagingIssues in messaging modules (jms, messaging)Issues in messaging modules (jms, messaging)theme: observabilityAn issue related to observability and tracingAn issue related to observability and tracingtype: bugA general bugA general bug