Whenever there is an exception in the code that handles the message, no more new messages will be processed by the queue subscriber.
This is how we reproduced : Post a message to the queue so that the message causes an exception in message handler code. After that, posting any new messages to the same queue will not be received by the subscriber.
We had to fix the issue by wrapping the message handler code in try-catch block as shown below.
q.subscribe({ack: true}, function (message) {
try{
}catch(e){
}
q.shift();
}
Please let us know if there is any better approach.
Whenever there is an exception in the code that handles the message, no more new messages will be processed by the queue subscriber.
This is how we reproduced : Post a message to the queue so that the message causes an exception in message handler code. After that, posting any new messages to the same queue will not be received by the subscriber.
We had to fix the issue by wrapping the message handler code in try-catch block as shown below.
Please let us know if there is any better approach.