Improving Reliability When Publishing to Service Bus from APIM

Krista Scerri 40 Reputation points
2026-11-11T12:19:12.27+00:00

I am currently publishing messages to Service Bus (SB) from APIM using the send-request policy.

The policy is configured with:

  • Timeout: 3 seconds
  • Retry count: 3
  • Retry interval: 1 second
  • First-fast-retry: enabled

Unfortunately, I cannot use the send-service-bus-message policy because we are running APIM Standard v2.

Our workload is approximately 130,000 requests per day, all of which are published to a Service Bus Standard namespace.

Occasionally, messages are not published successfully. In Service Bus metrics, these incidents appear as server errors, while APIM logs show request timeouts. From our observations, it seems that Service Bus sometimes takes longer than 3 seconds to respond, causing APIM to time out. However, during these incidents, Service Bus metrics generally do not indicate any throttling or capacity-related issues.

I am aware that the recommended retry interval for Service Bus is typically around 10 seconds, but our API must acknowledge incoming requests within 5 seconds, which limits our ability to increase timeouts or retry delays.

My main concern is reliability. I do not want to acknowledge a request before the message has been successfully published to Service Bus, as this could result in a lost request if the publish operation ultimately fails.

Given these constraints:

  • What would be the recommended approach to improve reliability in this scenario?
  • Is using an Azure Function as an intermediary publisher a better pattern, both from a durability and operational perspective?
  • Would it provide more robust retry handling and reduce the risk of message loss compared to publishing directly from APIM via send-request?

Any recommendations or best practices for handling this pattern would be appreciated.

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


1 answer

Sort by: Most helpful
  1. SHOUMIK CHAKRAVARTY 1,455 Reputation points
    2026-11-13T15:15:52.2433333+00:00

    Hi @Krista Scerri

    Before building a buffer, it is worth checking whether the Standard Service Bus tier is the real cause of the delays.

    The Premium and Standard comparison lists Standard as “Variable latency” and Premium as “Predictable performance”, because Premium “provides dedicated resource isolation at the CPU and memory level”. What you are seeing, occasional responses over three seconds with no throttling or capacity issues, fits that pattern.

    The same page lists Premium as “Fixed pricing” against Standard’s “Pay as you go variable pricing”, so it is worth pricing before deciding.

    So the choice is:

    • Premium: reduces the latency and lets you keep your current design, at a fixed cost.
    • Buffer and worker: absorbs the latency, costs less at your volume, and also helps if Service Bus becomes unavailable.

    If keeping the publish before acknowledge behaviour is important, Premium is the only option that preserves it.

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.