Skip to content
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

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

Open
Ahmetanakol opened this issue Mar 1, 2024 · 6 comments
Assignees
Labels
azure-spring All azure-spring related issues azure-spring-jms Issues related to Spring JMS. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Milestone

Comments

@Ahmetanakol
Copy link

Ahmetanakol commented Mar 1, 2024

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

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels Mar 1, 2024
@jsquire jsquire transferred this issue from Azure/azure-sdk-for-net Mar 1, 2024
@jsquire jsquire added Service Attention Workflow: This issue is responsible by Azure service team. azure-spring All azure-spring related issues and removed needs-team-triage Workflow: This issue needs the team to triage. labels Mar 1, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @chenrujun @moarychan @Netyyyy @saragluna.

@Netyyyy Netyyyy added the azure-spring-servicebus Spring service bus related issues. label Mar 4, 2024
@Netyyyy
Copy link
Member

Netyyyy commented Mar 4, 2024

Hi @Ahmetanakol , Thank you for reporting this issue. We have received your submission and will take a look. Could you help provide a minimal project and complete logs?
Please feel free to provide any additional information or context that you think may be helpful. We'll keep you updated on the progress of our review.

@joshfree
Copy link
Member

joshfree commented Mar 4, 2024

Possibly related issue: #29881

@Ahmetanakol
Copy link
Author

Ahmetanakol commented Mar 5, 2024

Hello @Netyyyy , I created a sample project in order to simulate the behaviour we are seeing in our production application. However I am not sure what triggers this behaviour. Meanwhile, I can share some of the logs that contains tracking ids I believe they can help you with the investigation.

Log level: WARN

Logger Class: org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder

Message: Open of resource:(JmsConsumerInfo: { ID:d7f8d045-3753-4eb3-b676-cce0b0f8cc71:14:12:63982, destination = fueling-process-initiated }) failed: Local transactions cannot span multiple top-level entities such as queue or topic. TrackingId:f2e784d0b104442092dfeed33a988b35_G5S2, SystemTracker:gateway5, Timestamp:2024-03-04T14:10:35 [condition = amqp:not-allowed]

I am attaching the sample project too. You can see how we send messages to the queues and consume those messages via JmsListeners.

demo.zip

@Netyyyy
Copy link
Member

Netyyyy commented Mar 13, 2024

Hi @Ahmetanakol , thanks for reply, but there seems to be some problem opening your demo, could you help check about that?
image

@Ahmetanakol
Copy link
Author

Hi @Netyyyy I am able to download the zip file. I am not sure why you are having trouble. I uploaded it again. Additionally, you can also find it here https://github.com/Ahmetanakol/demo/tree/main/demo

@saragluna saragluna added azure-spring-jms Issues related to Spring JMS. and removed azure-spring-servicebus Spring service bus related issues. labels Jun 26, 2024
@saragluna saragluna added this to the Backlog milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues azure-spring-jms Issues related to Spring JMS. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
Status: Todo
Development

No branches or pull requests

6 participants