Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Messaging and Event Handling Options in Azure

DZone's Guide to

Messaging and Event Handling Options in Azure

Azure provides a variety of options to handle messages, events, and integration. Given below is a brief overview of some of the options available within Azure.

· Integration Zone ·
Free Resource

Learn more about how to Prevent Slow or Broken APIs From Affecting Your Bottom Line.

Message Handling Options in Azure

Messages are published from publishers to receivers and there might be scenarios where the receivers respond back. For example, they may contain information regarding a purchasing order or they might hold routing/processing steps. There might be contractual agreements on the time within which they should be processed, the order in which they should be processed, the value associated with them, etc.

Azure Service Bus, Azure Logic Apps, and Azure API Gateway are some of the message handling options available in Azure.

Azure Service Bus

Azure Service Bus is a multi-tenant cloud service that provides reliable integration services. Azure Service Bus enables communications using Queues, Topics, and Relays. Azure Service Bus provides enormous scalability.

Image title


Queue

Topic

Relay

Communication

Unidirectional

Single Recipient

Unidirectional

Single Recipient

Bi-Directional

Pattern

Broker-Acts as an intermediary

Publish and subscribe –A topic can have multiple Subscriptions


Not a Broker - passes messages - Relay provides the ability to send a message to a connected receiver.

Messages

Stores sent messages until they are received.

Stores sent messages until they are received.

Does not store messages.

Sample Scenarios

Batch and mobile applications where the sender and receiver need not be online all the time.


Multiple systems are interested in subscribing to the same message.

Connecting on-premises applications which are running inside data centers behind firewalls.

Sample Scenarios:

  • Communication between cloud and on-premise applications.
  • Communication between applications behind firewalls inside organizations’ data centers.
  • Asynchronous processing of messages using queues and topics. This also takes care of load leveling.
  • Transaction-based message processing.

Azure Logic Apps

Azure Logic Apps helps build mission-critical integration workflows to integrate applications and data across on-premise and cloud and to orchestrate microservices/workflows. It provides a host of connectors that help connect with on-premise systems, cloud systems, Cognitive Services, Azure IoT Suite, Azure Storage Blob, Office 365, SalesForce, Azure Event Grid, etc. It provides support for industry-standard protocols like AS2, X12, EDIFACT, etc., and the capability to process XML messages, flat files, etc.

It provides an easy to use visual designer interface, which supports easy creation of workflows. Logic Apps can be coupled with Azure Functions to include custom code if required.

Azure Logic Apps provides a host of connectors that include standard connectors for connecting to:

  • Power BI, Azure Blob Storage, Event Hub, Twitter, OneDrive etc.,

  • On-Premise Connectors such as Oracle DB, BizTalk Server, SharePoint etc.,

  • Integration account connectors which provide support for transforming, validating XML, decoding, supporting standard formats like X12 and enterprise connectors for connecting to SAP, MQ, etc.

A logic app consists of actions, triggers, workflows, and flow controls.

Sample Scenarios:


Image title

  • Communication between cloud and on-premise applications.

  • Data Validation, Transformation, Routing scenarios.

  • Workflows consisting of various steps with custom tasks executed by Azure Functions.

  • When triggered by an event, a logic app can be leveraged to process the message and send a notification or response back. 

Azure API Management

Azure API Management Gateway is a highly scalable cloud gateway that can help applications to connect to backend services, help connect decoupled client and services, provides security, performance and health monitoring, and helps publish APIs internally and externally.

Image title

Azure API gateway supports

  • Gateway Aggregation which helps aggregate individual requests into a single request reducing round trips thereby improving latency.

  • Gateway Offloading which helps in providing services like cross-cutting concerns (caching, logging) which help to focus on the API's functionality.

  • Gateway Routing which helps route requests to one or more services in the backend, acting as a reverse proxy.

Sample Scenarios:

  • Expose data as a service – get paid for data consumed by other services.

  • Connect to backend services.         

Event Handling Options in Azure

Events are messages which are related to stating facts as information and do not contain publisher intent. Triggering of an event (email notification) can happen in scenarios for various business events that happen, like creating a new proposal in the CRM system. These are events triggered based on some business activity that has happened. Other types of events are events that have data samples collected for a certain time period which can be further analyzed. These are related to Data Point Analysis.

Azure Event Hub, IoT Hub, and Event Grid are some of the event-based options available in Azure.

Azure Event Hub

Azure Event Hub provides a scalable cloud-based event ingestion and data streaming platform which can reliably ingest and process huge volumes of events and data. It is capable of processing millions of events per second.


Image title

Sample Scenarios:

  • Data ingested by Event Hub is processed using Stream Analytics or any other real-time analytics provider and stored.

Azure IoT Hub

Azure IoT Hub is a scalable cloud gateway that connects devices and ingests data from a large number of devices. It provides a platform to stream data and manage a large number of devices. It provides durability of the messages, enabling resilience in the event of no device connectivity, ‘at least once delivery guarantees’ for both device-to-cloud and cloud-to-device messaging.

Sample Scenarios:

  • Remote monitoring: Connect data and monitor devices from remote locations.
  • Predictive maintenance: Ingest data from devices and avoid unscheduled downtime by monitoring devices.
  • Connected factory: Connect and monitor industrial devices across the factory to derive insights to drive operational productivity.


Azure Event Hub

Azure IoT Hub

Capabilities

Provides Publish-Subscribe (pub/sub) capabilities

Partitions enable each consumer to only read a specific subset of the event stream.

Event Hub provides support for high throughput and event processing scenarios.

Provides reliable and secure bidirectional communication between millions of IoT devices and a solution backend.

Communication

From devices to the backend.

Bidirectional

Supports device-to-cloud and cloud-to-device communication.

Protocols supported

MQTT, MQTT over WebSockets, AMQP, AMQP over WebSockets, and HTTP


MQTT, MQTT over WebSockets, AMQP, AMQP over WebSockets, HTTP and Protocol Adapter

 

Pricing

https://azure.microsoft.com/en-us/pricing/details/event-hubs/

https://azure.microsoft.com/en-in/pricing/details/iot-hub/

Usage Scenarios

Telemetry, streaming

Recommended for IoT-based solutions.

Remote Monitoring

Predictive Maintenance

Connected Factory

Connected Vehicle


Azure Event Grid

Azure Event Grid allows you to develop applications with a near real-time, reliable, scalable, and event-based architecture that manages the routing of events and is capable of providing high throughput for handling millions of events per second. It is built on Service Fabric. This also allows multiple endpoints to subscribe to the same message. Filters based on event type and prefix are used to route specific events to different endpoints. Pre-defined system events in Azure or custom topics can be subscribed to as well.

Event Grid has built-in support for events coming from Azure services and it provides support for application and third-party events, using custom topics and custom webhooks, as well.

Image title

Image Source

References:

Learn about the Five Steps to API Monitoring Success with Runscope

Topics:
integration ,cloud integration ,iot integration ,data integration ,azure

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}