Event Grid - No failure case when publishing events
See original GitHub issueHi,
I am using nodejs library for Event Grid (azure-eventgrid).
If I provide wrong values for Topic Endpoint or Access Key parts, publishing events doesn’t fail as expected. It doesn’t output anything for neither then
or catch
part.
I am using this in a Azure Functions component.
let topicCreds = new msRestAzure.TopicCredentials(EVENT_GRID_ACCESS_KEY);
let egClient = new eventGrid(topicCreds);
let topicUrl = url.parse(EVENT_GRID_TOPIC_ENDPOINT, true);
let topicHostName = topicUrl.host;
egClient.publishEvents(topicHostName, events).then((result) => {
context.log.info('Published all events to Event Grid!')
}).catch((err) => {
context.log.error('Event Grid publishing events error: ' + err);
});
How can I fetch failure cases?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Event Grid message delivery and retry - Azure - Microsoft Learn
Describes how Azure Event Grid delivers events and how it handles undelivered messages.
Read more >Azure Event Grid — Handling Failures | by Mike Rogers
All you can do is store the failed events in a storage account. A process known as dead-lettering. Resubmit failed events. There is...
Read more >How to determine cause of Azure EventGrid message delivery ...
It appears the only way to determine why an Event Grid message failed to be delivered is to turn on Dead Lettering.
Read more >Event Grid Delivery and Retry Policy | Serverless360
For any reason, if the Event Subscription fails to receive the events, there is a Dead-lettering mechanism available to capture the failed ......
Read more >Azure Event Grid vs Service Bus - LinkedIn
In the case of Microservices Architecture, one of the common ... Event Grid does not guarantee the order of Events delivery whereas with ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @chradek. Now I got what I expect. Thanks for your time. @ramya-rao-a I am closing the issue as @chradek helped me a lot.
@mustafababil I believe the issue is because you’re calling
context.done()
at the bottom of your function outside of yourpublishEvents
call. SincepublishEvents
is non-blocking, execution will continue to the end of your function before yourthen
orcatch
handlers are invoked.Since you’re already using an
async
function, you can useawait
with publishEvents instead to get the affect you want: