Message Sent to Azure Service Bus Queue, But Not Visible in Queue Despite Successful Metrics

Aakash Goswami 25 Reputation points
2025-04-26T22:20:31.9366667+00:00

I am following the official documentation https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/using-service-bus-in-spring-applications to send a message to an Azure Service Bus queue using Spring Framework in a Java application. Specifically, I am working with the first example, which should log the message sent to the queue as follows:

Sent a message to the queue Processing message. Id: 6f405435200047069a3caf80893a80bc, Sequence #: 1. Contents: Hello, World!

I see the above log in my IDE terminal, indicating that the message has been successfully sent. However, when I check the Azure Service Bus queue metrics, I notice that:

  • Incoming Requests (Sum): 273
  • Successful Requests (Sum): 273
  • Server Errors (Sum): 0
  • User Errors (Sum): 0
  • Throttled Requests (Sum): 0

Additionally, the Incoming Messages (Sum) and Outgoing Messages (Sum) show values of 2, indicating that messages are being sent and received. Despite this, I am unable to see the message in the queue.

From this, it seems that the message might be automatically consumed, but I have not yet configured any receiver for the queue. Could anyone help me understand why this might be happening? Are there any configurations or settings that I might have missed that would cause the message to be consumed automatically?

Thank you for your assistance!

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
697 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Aakash Goswami 25 Reputation points
    2025-04-27T14:08:27.3833333+00:00

    Issue resolved!!! I was simultaneously consuming the message from the queue as soon as message push into the queue. That's why i was not getting any active message in the queue.

    Thanks so much for support!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.