how to send push notification when Azure blob create or update - azure

I am new in Azure development. I managed to make an Azure blob and Notification Hub. I would like to send a push notification as soon as a blob is created. I have no idea how to do it. Could you please share some idea and links? Thanks!

You could use a blob trigger in Azure Function to do it,
The Blob storage trigger starts a function when a new or updated blob is detected.
then set the Notification Hubs output binding, when the function is triggered, it will send push notifications.
This article explains how to send push notifications by using Azure Notification Hubs bindings in Azure Functions. Azure Functions supports output bindings for Notification Hubs.

Related

Send event from Azure Blog Storage to Azure IoT Hub

I have a NodeJS app that can successfully send data to the Azure IoT Hub, which in turn sends the data to the Azure Blob Storage.
That all works fine.
I can also manually send a message with the Message to device tool of the Azure Devices portal and I can receive this message in my NodeJS app.
What I want to do now, is to send a confirmation message back to the NodeJS app when the blob has been created or deleted.
Can someone please guide me on how to do that? There is little information out there to send messages back to the Azure Client.
I see that I can create a subscription to the Azure Blob Storage but I don't know how to hook it up to the Azure IoT Hub.
Cheers
This is possible by using an Azure Function with a Blob Storage trigger. You could write an Azure Function that subscribes to blob storage changes and use the IoT Hub Service SDK to send a message back to the device. I'm assuming you're using IoT Hub's message routing feature to store the telemetry in blob storage. This comes with a challenge, as there is no way to tell from the name of the blob what device it originated from. You would need to combine it with a blob input to read the file input.
Do you absolutely need this confirmation on the device side? Another note, if you're not interested in persisting telemetry, but instead want to upload a file from your NodeJS app, you could consider the IoT Hub File Upload feature instead.
You can use a device twins to represent a state between the device and service sides.
Updating a state (device twin) at the service side, the notification message is delivered to the device side.

How to save the data from GZIPPED file by converting to JSON into ADLS

I have an Event HUB which will receive GZIPPED Json Data as Messages. Any idea on how to catch these message and save the JSON to ADLS.
You can try the Event Hubs Capture feature.
Azure Event Hubs enables you to automatically capture the streaming data in Event Hubs in an Azure Blob storage or Azure Data Lake Storage Gen 1 or Gen 2 account of your choice.
You can follow the official MS docs to further Setting up Event Hubs Capture
To Capture data to Azure Data Lake Storage Gen 2 using Azure portal
(this is not available in basic namespace pricing, choose atleat standard plan)
1. Once you have the event hub namespace, create an event hub, while
creating select the enable capture
2. Later you can find and configure it at
Event hubs instance > features > Capture
Note:
If you enable the Capture feature for an existing event hub, the
feature captures events that arrive at the event hub after the feature
is turned on. It doesn't capture events that existed in the event hub
before the feature was turned on.

How to events from azure event hub to azure blob storage using logic app?

I want to move events from azure event hub to Azure blob storage using the logic app, can anyone suggest to me how to use with logic app connector, triggers, and action with the designer example.
Note:
Events are json events and need to be stored in blob storage.
You can start with a blank logic app, and use the search assistant to find what you're looking for.
Typing event hub gives:
where you can provide the connection by providing the name.
Save the content in a variable.
You can use SaveInitialJsonToBlobStorage to now store this json in a blob storage:

Can azure event hub ingest json events from azure blog storage without writing any code?

Is it possible to use some ready made construct in azure cloud environment to ingest the events (in json format) that are currently stored in azure blob storage and have it submit those events directly to azure event hub without writing any (however small) custom code? In other words, I would like to use configuration driven approach only.
Sure. You can try to use Azure Logic Apps to realize your needs without any code or just with some function expressions, please refer to the offical documents of Azure Logic Apps to know more details.
The logic flow is as the figure below.
You can refer to my sample below to make it works.
Here is my sample to receive an event from my EventHub and transfer to Azure Blob Storage to create a new blob for storing the event data.
Create an Azure Logic App instance on Azure portal, it should be easy for you.
Move to the tab Logic app designer to configure the logic flow.
Click Save and Run buttons. Then, use ServiceBusExplorer (downloaded from https://github.com/paolosalvatori/ServiceBusExplorer/releases) to send event message and check whether new blob created using AzureStorageExplorer. It works fine after a few minutes.

Message from Azure Blob Storage to Azure Service Bus

I'm trying to figure out if Azure Blob Storage has similar functionality to Amazon S3. An S3 bucket can be configured in a way, that when new object is created, bucket sends message to SQS. I'm wondering if Azure Blob Storage is able to do the same with Azure Service Bus (which is kind of similar to SQS, correct?).
The only resource I've found so far, which mentions something similar is https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-event-overview, but there is no Azure Service Bus on the right side. I know I can use Functions as a proxy, but I'm interested in direct connection.
Any ideas?
Service bus(I think you compare service bus with SQS and SNS in AWS) don't have the ability to subscripe to Blob storage events. Event Grid(the link that you reffered to has Service bus support on the roadmap but no date is confirmed.
I think your best choice is Azure Functions(or Logic app if you don't want to write code) that has a blob Storage trigger to catch events and do action X.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-storage-blob-triggered-function.
Or wait a litte for event grid but you still get that "proxy" part.
One option is to use logic apps/ event grid and you can add trigger directly from azure blob storage (https://azure.microsoft.com/it-it/blog/azure-service-bus-now-integrates-with-azure-event-grid/) . Another option would be to add blob trigger with azure functions and write the code to do whatever action which you are looking for .

Resources