What's the backend mechanisms for azure function service bus trigger? How it works?

brucezcsi 46 Reputation points
2023-12-06T05:24:42.17+00:00

As the title describes, does someone know how various of azure function triggers work, such as the service bus trigger?

MS doc only shows how to use these features, but nowhere explains what it actually does.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,929 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2023-12-07T06:53:11.3366667+00:00

    @brucezcsi Thanks for reaching out.

    No, it is not continuously polling, it uses a message handler to listen for new messages on the queue or topic. When a new message is detected, the message handler is triggered, and the function is executed. The message handler is implemented using the Service Bus SDK, which provides a message pump that listens for new messages on the queue or topic. However, the message pump is not continuously polling the queue or topic. Instead, it uses a long-polling mechanism to wait for new messages. This means that the message pump will only receive new messages when they are available and will not continuously poll the queue or topic.

    Let me know if you have any queries or concerns.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-12-06T05:47:58.57+00:00

    Thanks for posting your question in the Microsoft Q&A forum.
    Azure Functions with Service Bus triggers seamlessly integrate serverless compute and message-based communication. The platform abstracts many underlying complexities, such as connection management, scaling, and error handling, allowing developers to focus on the business logic within the function. The polling mechanism, along with automatic scaling, ensures efficient processing of messages from Service Bus entities.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is 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.