Azure functions not processing all the messages

Niraj 45 Reputation points
2023-07-24T09:55:11.2266667+00:00

Hi, I have this issue where the azure function is not processing all the messages. I confirmed in the service bus if all my messages were there or not and I could see all my 150 messages in the queue in the azure portal. When the function gets triggered it doesnt process all the messages. The session id is same for all messages. Also in application properties of the message I send this json
{'msgCount': 1, 'msgTotal': 150, 'isLastMessage': False, 'isFirstMessage': True}
{'msgCount': 2, 'msgTotal': 150, 'isLastMessage': False, 'isFirstMessage': False}

................

{'msgCount': 150, 'msgTotal': 150, 'isLastMessage': True, 'isFirstMessage': False}.

What happens is I get the messages in squence but some of the messages in between get dropped.
Need help been facing this issue since last 3 months

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
635 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,090 questions
{count} vote

Accepted answer
  1. MayankBargali-MSFT 70,531 Reputation points
    2023-07-25T05:36:28.8133333+00:00

    Hi @Niraj

    I'm glad to see you were able to resolve your issue. Thanks for posting your solution so that others experiencing the same thing can easily reference this.

    Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    Issue: You observe that your azure function was not processing all the messages. You are using the same session id for all your messages. You observe that the messages are not getting in sequence and looks like some messages are dropped.

    Resolve: You have updated your code and added the message id to the message which was previously not passed.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.