Event Hub is receiving event after 15s when using log-to-eventhub policy in APIM

Marko Ilic 25 Reputation points
2024-04-24T01:13:04.54+00:00

I have exposed service on APIM. What I want is to send the request to Event Hub. When I try to use log-to-event-hub policy the request has been sent to Event Hub but it appears in Event Hub after 15s.

I tried to do the same with send-request policy and request appears immediately in Event Hub after calling service on APIM.

What can be the issue with log-to-eventhub policy?

Event Hubs Namespace is in Standard Tier.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,769 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
559 questions
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 21,471 Reputation points
    2024-04-24T10:19:44.52+00:00

    @Marko Ilic Thanks for reaching out. when using log to EventHub policy APIM does not send events instantly. Messages are queued in memory and are flushed every about ~15 seconds. This is not configurable. so, 15-20 second delay is to be expected.

    If you want to send instantaneous notification somewhere, you must consider using send-request policy.

    do let me know incase of further queries, I would be happy to assist you.

    Please accept as Yes if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful