<p>I checked Azure AKS log by <code>kubectl logs &lt;-POD-&gt;</code> which I log the message ID at the beginning when start to handle it. However, there was no log to log down a few messages which went to Deadletter suddenly. I tried to put them to normal queue again but faced similar result. </p>

<p>Why is it happening? How to solve it?</p>

<p>Below is log that I can see sometimes but it should be also resume processing messages after a period of time. (I ran 4 pods in parallel)</p>

<pre><code>    Error for serviceBusService.receiveQueueMessage()
    Error: &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"&gt;
    &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Service Unavailable&lt;/TITLE&gt;
    &lt;META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"&gt;&lt;/HEAD&gt;
    &lt;BODY&gt;&lt;h2&gt;Service Unavailable&lt;/h2&gt;
    &lt;hr&gt;&lt;p&gt;HTTP Error 503. The service is unavailable.&lt;/p&gt;
    &lt;/BODY&gt;&lt;/HTML&gt;
        at Function.ServiceClient._normalizeError (/usr/src/app/node_modules/azure-common/lib/services/serviceclient.js:757:12)
        at ServiceBusService.ServiceClient._processResponse (/usr/src/app/node_modules/azure-common/lib/services/serviceclient.js:455:41)
        at Request.processResponseCallback [as _callback] (/usr/src/app/node_modules/azure-common/lib/services/serviceclient.js:213:35)
        at Request.self.callback (/usr/src/app/node_modules/request/request.js:185:22)
        at Request.emit (events.js:203:13)
        at Request.&lt;anonymous&gt; (/usr/src/app/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:203:13)
        at IncomingMessage.&lt;anonymous&gt; (/usr/src/app/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:291:20)
        at IncomingMessage.emit (events.js:208:15)
</code></pre>

DaiKeung
<p>Looks like you may be hitting into a <a href="https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-exceptions" rel="nofollow noreferrer">transient exception</a>. On such errors, you could setup an retry with a backoff until it succeeds.</p>

<p>I believe in most cases such errors should resolve in a couple of retries unless there is a major problem with the service at the time.</p>
