Setup of JMS message listener invoker failed for destination 'queue-name' - trying to recover. Cause: Local transactions cannot span multiple top-level entities such as queue or topic. TrackingId:some_tracking_id, SystemTracker:gateway5, Timestamp:2024-02-29T21:57:11 [condition = amqp:not-allowed] #39046
Description
Library name and version
spring-cloud-azure-starter-servicebus-jms 5.9.1
Query/Question
Hello Team,
We are using JmsListener to consume messages from servicebus queues. We have multiple queues on servicebus namespace.
This is how we annotate each listener method.
@JmsListener(destination = "ServicebusQueueName", containerFactory = "jmsListenerContainerFactory")
JmsTemplate is used to enqueue messages
jmsTemplate.send(
queueName,
session -> {
var message = jmsTemplate.getMessageConverter().toMessage(content, session);
AmqpJmsMessageFacade facade = (AmqpJmsMessageFacade) ((JmsTextMessage) message).getFacade();
facade.setTracingAnnotation(
"x-opt-scheduled-enqueue-time",
Date.from(OffsetDateTime.now()
.plusSeconds(5)
.toInstant()));
return message;
});
Whenever a message is received, we processed it and then enqueue a new message to one of our queues. What we realized is that we see a lot of warnings in our application logs.
Open of resource:(JmsConsumerInfo: { ID:some_id destination = ServicebusQueueName }) failed: Local transactions cannot span multiple top-level entities such as queue or topic. TrackingId:some_tracking_id, SystemTracker:gateway5, Timestamp:2024-03-01T10:23:23 [condition = amqp:not-allowed]
We are able to receive and process the incoming message and then we send it to a different or same destination with updated data. The reported warning doesn't prevent us from receiving and sending messages, however I would like to understand why it is happening. Any help would be appreciated.
Thank you
Environment
Azure Servicebus - Queues hosted on Azure cloud platform
Project Dependencies:
Java 17
spring-boot-starter-parent 3.2.3
spring-jms 6.1.4
jakarta.jms-api 3.1.0
spring-cloud-azure-starter-servicebus-jms 5.9.1
Spring Boot Servicebus JMS Configuration:
spring:
jms:
servicebus:
connection-string: SERVICEBUS_CONNECTION_STRING
pricing-tier: 'premium'
idle-timeout: 1800000
pool:
enabled: true
Metadata
Metadata
Assignees
Labels
Type
Projects
Status