Loading...

[Azure Service Bus] JMS messages getting dead-lettered

[Azure Service Bus] JMS messages getting dead-lettered

The article discusses a problem where numerous messages end up in the dead letter queue (DLQ) when the JMS service bus consumer connects to the Azure Service Bus using Qpid jars. The reason for the messages being dead-lettered is that they have reached the maximum delivery count.

 

The fundamental issue stems from Apache Qpid's message handling. Qpid utilizes a local buffer to prefetch messages from the Azure Service Bus, storing them prior to delivery to the consumer. The complication occurs when Qpid prefetches an excessive number of messages that the consumer is unable to process within the lock duration. Consequently, the consumer is unable to acknowledge or finalize the processing of these messages before the lock expires, leading to an accumulation of messages in the Dead Letter Queue (DLQ).

 

To address this problem, it is crucial to either turn off Qpid's local buffer or modify the prefetch count. Disabling prefetching is achievable by setting jms.prefetchPolicy.all=0 in the JMS URL. This configuration allows the JMS client to directly consume messages from the Azure Service Bus, circumventing Qpid's local buffer. Consequently, the consumer can process messages at a suitable pace, guaranteeing smooth processing and issue-free completion.

 

Why is Prefetch not the default option in Microsoft .NET/Java/Python libs?

 

 

Published on:

Learn more
Azure PaaS Blog articles
Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related posts

Azure Cosmos DB Conf 2025 Recap: AI, Apps & Scale

On April 15, 2025, developers from around the world came together for Azure Cosmos DB Conf 2025—a free virtual event co-hosted by Microsoft an...

15 hours ago

Copilot Studio – Introducing the Azure AI Search index as knowledge source feature

We are announcing the Azure AI Search index as a knowledge source feature for Copilot Studio. This feature will allow makers to build Copilots...

17 hours ago

Azure Cosmos DB with DiskANN Part 2: Scaling to 1 Billion Vectors with

Introduction In the first part of our series on Azure Cosmos DB Vector Search with DiskANN, we explored the fundamentals of vector indexing an...

1 day ago

Azure Service Bus Integration with Dynamics Business Central and External Systems – Part 2: Financials Integration

Introduction In this blog post, we’ll explore how to integrate financial data between an external system (EXT) and Microsoft Dynamics 365 Busi...

1 day ago

Azure Toolkit for IntelliJ: Introducing the enhanced Java Code Quality Analyzer!

Discover the latest updates to the Azure Toolkit for IntelliJ, featuring an enhanced Java Code Quality Analyzer to help you write cleaner, saf...

4 days ago

Azure Boards + GitHub: Recent Updates

Over the past several months, we’ve delivered a series of improvements to the Azure Boards + GitHub integration. Whether you’re tracking...

4 days ago

Introducing the Azure MCP Server

This post introduces the Azure MCP Server, bringing the power of the cloud to your AI agents. The post Introducing the Azure MCP Server appear...

5 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy