I am using Azure function to subscribe events from event grid topic.
Due to some failure If my Azure function stopped to work then Azure event delivery fails.
How to get emails notification when this delivery fails.
Azure Event Grid support dead-lettering. Once all retries have been exhausted, when dead-lettering is configure configured, failed events will be stored in Storage account as blobs. At that point, you're free to chose what mechanism to use to send your email notification. One option is to use Azure Function with Storage Blob trigger with SendGrid email binding.
Related
I am developing a .net core application where I would like to create an Azure Event Subscription to Azure blob storage in C#. I've set up a Event Grid System Topic
This Event Grid Topic is supposed to have a subscription that listens to events on Blobstore (created, delete, rename) and pushes them to a Service bus.
I would like to create an EventSubscription in C# but I can't find any references.
Eventgrid operates as a push and forget mechanism. So you can't have your aplication polling Event grid for an event. You need to have your application triggered by Event grid instead. The most suitable option would be an Azure function with is triggered by Event grid. See Link.
You can use a service bus output binding to write to Service bus. Refer to this documentation.
I have the following requirement: I'm deploying an ARM template from a service fabric service. Now I want to subscribe to that deployment resource and react/write a handler/custom webhook when it's state changes to a terminal state (success or failure). Currently we're polling every 60 seconds to check the status. I am reading about event hubs and event grids, but haven't yet found any helpful links.
I have created an application that works using MassTransit and Azure Service Bus as transport. Publish, send, retrieve events and commands - this is all works good. But now I want to create subscriber that will retrieve messages that publisher send after subscriber connected. How to do that? I do not want to get all messages that was sended by publisher before connection.
What you are asking for is not possible.
By definition, a publisher only sends to subscribers. If a subscriber is not connected at the time an event is published, that subscriber would not receive it. Only the subscribers that are connected at the time the event is published receive the event.
In the future, MassTransit will add support for Kafka and Event Hub, which will support what you want, but the semantics for those transports are quite different.
When a manager creates a task and sets the activation date in the future, it's supposed to be stored in the DB. No message is being dispatched out to the regarded workers, until a day or two before it's due. When the time's approaching, an email's being sent out to the subordinates.
Previously I've resolved that using a locally run Windows Service that scheduled the messaging. However, as I'm implementing something similar in the Azure, I'm not sure how to resolve it (other than actually hosting my own Windows Server in the cloud, of course, but kind of defeats the whole point).
Since my MVC application is strictly event driven, I've browsed around in the Azure portal to find a utility to schedule or postpone a method being invoked. No luck. So at the moment, all the emails are dispensed immediately and the scheduling is performed by keeping the message in the inbox until it's time (or manually setting up an appointment).
How should I approach the issue?
Other possible solution is to use Queueing mechanism. You can use Azure Storage Queues or Service Bus Queues.
The way it would work is when a task is created and saved in the database, you will write a message in a queue. This message will contain details about the task (may be a task id). However that message will be invisible by default and will only become visible after certain amount of time (you will calculate this period based on when you would need to send out the email). When the visibility timeout period expires, the message will become available to be consumed in the queue. Then you will have a WebJob with a Queue trigger (i.e. the WebJob will become alive when there's a message in the queue). In your WebJob code, you will fetch the task information from the database and send the notification to concerned person.
If you're using Azure Storage Queue, the property you would be interested in is InitialVisibilityTimeout. Please see this thread for more details: Azure storage queue message (show at specific time).
If you're using Azure Service Bus Queue, the property you would be interested in is BrokeredMessage.ScheduledEnqueueTimeUtc. You can read more about this property here: https://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.brokeredmessage.scheduledenqueuetimeutc.aspx.
One solution to run background tasks is to use Web Jobs. Web Jobs can run on a schedule (let's say once per day), manually or triggered by a message in a queue.
You can use Azure WebJobs. Basically, create a WebJob and schedule it to regularly check the data in your database for upcoming tasks and then notify people.
I am using Exchange web services (Exchange server 2010) to synchronize user's outlook calendar with my application.I implemented EWS Push Notifications to call back my application whenever events are created ,modified ,deleted by out look users. I achieved this by subscribing user's email credentials with EWS.
Client application should send OK responses to server whenever it get callbacks from the server .If there are no OK responses from client application for some time the particular subscription will be automatically unsubscribed.
If client is unreachable for some time due to any unexpected reason i need to subscribe only unsubscribed users instead of subscribing all the users.
My issue now is how to get unsubscribed users/Or subscriptions Id's from EWS?I couldn't find anything helpful regarding this in MSDN documentation.
Any one knows?
MSDN Reference
enter link description here
I believe the only way to do this is to make use of the StatusEvent
(I call it the heartbeat). When you subscribe, you set a parameter to indicate how often EWS is to POST to your Push HTTP listener. (I use 3 minutes--YMMV.) So after 3 minutes (plus a little extra to be sure), if you don't hear from EWS, either by a StatusEvent or some other "real" event for a subscription, then you should re-subscribe for that user.