{tocify} $title={Table of Contents}
And then checked the Subscriber logic app, it was triggered immediately and checked it's run history to validate the content
For advanced metrics go to Monitoring section and select Metrics, here you can choose from various metric options.
Introduction
One of the thing we need to identify while starting with any Integration project is whether the scenario demands for message based integration or event based integration.
When there is need to sync the systems and data is involved, message based integration should be designed, whereas when some action is to be taken based on some state change then event based integration should be used.
Message : Set of data produced by a system.
Event : Is a notification about some objects state change.
As per the need, integration can be build around messages or events or in some cases both can be used.
To cater this, Azure has three options/services to choose from
- Azure Event Grid
- Azure Event Hubs
- Azure Service Bus
Let's see about event grid and how it can be used.
What is Event Grid
It is a service from Azure which allows various entities/services/application to publish the state change notification to it and also to deliver those to them who are interested in knowing about it.
The real work of the Event grid is to route the events, and it does it with help of Publish and Subscribe methodology.
Thus you can use Event Grid when there is need to integrate applications based on events.
So any application can send(publish) events to Event grid and any application can receive(subscribe) to those events.
Event Grid has inbuilt support for almost all azure services through system topics, but it also does supports integration of non Azure services/application through Custom Topics.
Terminologies used in context to Event Grid are:
Events
An event is the information that describes something that happened in the system.
The maximum allowed size for an event is 1 MB.
Publishers
A publisher is the user or organization that sends events to Event Grid. Microsoft publishes events for several Azure services. You can publish events from your own application. Organizations that host services outside of Azure can publish events through Event Grid.
Event sources
An event source is where the event happens.
Your application is the event source for custom events that you define. Event sources are responsible for sending events to Event Grid.
Topics
Topic provides an endpoint where the source sends events.
System topics
System topics are built-in topics provided by Azure services such as Azure Storage, Azure Event Hubs, and Azure Service Bus. You can create system topics in your Azure subscription and subscribe to them.
Custom topics
Custom topics are application and third-party topics. Event subscribers can filter for the event types they want.
Event subscriptions
A subscription tells Event Grid which events on a topic you're interested in receiving.
When creating the subscription, you provide an endpoint for handling the event. You can filter the events that are sent to the endpoint by event type or event subject.
Event handlers
An event handler is the place where the event is sent.
Let's see through a demonstration how we can use Event grid custom Topic with one logic app as publisher and other as subscriber.
Note: For demo I have used Logic app, but it can be done same way with any custom application.
Create Event Grid Custom Topic
xyz
Now the Event grid custom topic is created, and with the help of Topic endpoint we can push events to this Custom Topic
Create Logic App to publish events to above created Custom Event Grid Topic
Keeping it simple, using Recurrence trigger to trigger this logic app.
Click on new step and search for Event Grid, select event grid publish action
To get access key, go to the Event Grid Custom topic you created -> Settings->Access Keys. And copy either of the key and provide it against Shared access signature.
Note: ID has to be unique, thus used guid() function.
The publisher to Event grid custom topic is created, and with the help of this logic app we can push events to this Custom Topic.
Now, let's create a subscriber to this events.
Create Logic App to subscribe to the events published to above created Custom Event Grid Topic
Now, the subscriber is also ready. The final step is to create a subscription on custom topic.
Copy the HTTP Post URL and save as this will be used while creating subscription.
Create Event subscription on Custom Event Grid Topic
Go to the overview page of custom Event grid topic and click on +Event Subscription
Against Event Types provide the EventType you want to get (here DemoType as that's what we will publish and want it to be subscribed by Subscriber logic app) .
In Endpoint Details section, select Webhook as Endpoint type (the other options available are Azure Function, Storage queues, Event hubs, Hybrid connections, service bus queue, Service bus topic, Partner Destination) and against Endpoint provide the HTTP Post URL of above subscriber Logic App.
Click on create and that's it, Event Subscription is ready.
Note: There are other Tabs also to do advanced configuration. But for demo limiting it to Basics.
Testing
Manually triggered the Publisher Logic App, and checked the run history
And then checked the Subscriber logic app, it was triggered immediately and checked it's run history to validate the content
For advanced metrics go to Monitoring section and select Metrics, here you can choose from various metric options.
Summary
We saw basics of how we can leverage Event grid custom topic to create a event based integration solution, will post about advanced features in future.
Although I have used Logic app for demo, but any custom application can do the same.
Any application can publish to custom topic with the help of Topic endpoint and access key .
And any application can subscribe to events with the help of Webhook.
Learn More about Logic App
- How to configure Logic App Standard workflow behind Azure APIM
- How to Query Azure Table storage from Logic App | How to filter results of Azure Table storage from Logic App
- Understanding expressions in Logic Apps | Frequently used expressions in Logic Apps | What is expressions in Logic App
- How to use Logic app Run History | How to troubleshoot Logic App workflow execution
- Logic App and Slack - Sending messages to slack channel | Logic app and slack integration | Connecting Logic App to Slack channel
- How to access Application settings fields value from Logic app Standard workflow | Using Application settings as configuration store for Logic app standard workflow
- Developing Logic app standard workflow which uses Map locally and deploying to Azure
- Developing Logic App Standard Workflow Using Visual Studio Code | Create Logic App Standard Workflow Using Visual Studio Code
- Logic App - Xml to Json using Liquid Map | Append in Liquid Map
- How to use Azure Event Grid Custom Topic | Publishing and Subscribing from Azure Event Grid Custom Topic using Logic App
- Using Azure Storage Account Table as Config Store for Logic Apps | How to read and write from Logic App to Azure Storage Account Table
- Get Logic App Name in Logic App
- Difference between Logic App Consumption and Logic App Standard
- Getting Started with Logic App Standard | Overview of Logic App Standard | Basics of Logic App Standard
- How to find count of Logic App executions using Azure Portal
- Azure Functions vs Azure Logic App | Difference between Azure Functions and Azure Logic App
- Getting started with Logic App : Liquid Map | Using Liquid template in Logic app
- How to get actual error message of Scope in Logic App | Exception Handling in Logic app
- Interview questions and answers on Logic Apps | Interview questions for azure logic app developers
- How to execute Stored Procedure in Logic App | How to connect to SQL in Logic App
- How to get current date in logic app | How to format date time in Logic App
- BizTalk Developer getting started with Logic App
- Getting Started with Logic Apps - Fundamentals
- Getting Started with Logic Apps - Enterprise Application Integration
- Getting Started with Logic Apps - AS2
- Getting Started with Logic Apps - EDI X12 Fundamentals
- Getting Started with Logic Apps - XML to EDI X12
- Getting Started with Logic Apps - EDI X12 to XML
- Getting Started with Logic Apps - What happened to the Request?
- Inserting Multiple Records In On Prem SQL Using Logic App
- Inserting data in On Premises SQL Database using Logic Apps
- Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
- XML Batching(Aggregation) in Logic App
- Batching(Aggregating) messages in Logic App
- Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
- Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
- Securing Logic App with Azure Active Directory authentication
- Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
- Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
- Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
- Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array
- How to configure Logic App Standard workflow behind Azure APIM
- How to Query Azure Table storage from Logic App | How to filter results of Azure Table storage from Logic App
- Understanding expressions in Logic Apps | Frequently used expressions in Logic Apps | What is expressions in Logic App
- How to use Logic app Run History | How to troubleshoot Logic App workflow execution
- Logic App and Slack - Sending messages to slack channel | Logic app and slack integration | Connecting Logic App to Slack channel
- How to access Application settings fields value from Logic app Standard workflow | Using Application settings as configuration store for Logic app standard workflow
- Developing Logic app standard workflow which uses Map locally and deploying to Azure
- Developing Logic App Standard Workflow Using Visual Studio Code | Create Logic App Standard Workflow Using Visual Studio Code
- Logic App - Xml to Json using Liquid Map | Append in Liquid Map
- How to use Azure Event Grid Custom Topic | Publishing and Subscribing from Azure Event Grid Custom Topic using Logic App
- Using Azure Storage Account Table as Config Store for Logic Apps | How to read and write from Logic App to Azure Storage Account Table
- Get Logic App Name in Logic App
- Difference between Logic App Consumption and Logic App Standard
- Getting Started with Logic App Standard | Overview of Logic App Standard | Basics of Logic App Standard
- How to find count of Logic App executions using Azure Portal
- Azure Functions vs Azure Logic App | Difference between Azure Functions and Azure Logic App
- Getting started with Logic App : Liquid Map | Using Liquid template in Logic app
- How to get actual error message of Scope in Logic App | Exception Handling in Logic app
- Interview questions and answers on Logic Apps | Interview questions for azure logic app developers
- How to execute Stored Procedure in Logic App | How to connect to SQL in Logic App
- How to get current date in logic app | How to format date time in Logic App
- BizTalk Developer getting started with Logic App
- Getting Started with Logic Apps - Fundamentals
- Getting Started with Logic Apps - Enterprise Application Integration
- Getting Started with Logic Apps - AS2
- Getting Started with Logic Apps - EDI X12 Fundamentals
- Getting Started with Logic Apps - XML to EDI X12
- Getting Started with Logic Apps - EDI X12 to XML
- Getting Started with Logic Apps - What happened to the Request?
- Inserting Multiple Records In On Prem SQL Using Logic App
- Inserting data in On Premises SQL Database using Logic Apps
- Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
- XML Batching(Aggregation) in Logic App
- Batching(Aggregating) messages in Logic App
- Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
- Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
- Securing Logic App with Azure Active Directory authentication
- Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
- Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
- Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
- Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array