Getting started with Microsoft Azure Service Bus
Azure Service Bus is a cloud messaging service used to connect applications, devices, and services running in the cloud to any other applications or services.
This page contains information to help you get started with Azure Service Bus in Semarchy xDI.
Create Azure Service Bus metadata
The Azure Service Bus metadata holds information about:
-
Azure Service Bus namespaces
-
Message queues
This metadata can be used in processes through Azure Service Bus actions with Semarchy xDI metadata features like referencing, configuration, and more.
To create Azure Service Bus metadata:
-
Right-click the folder where you want to create the metadata, then click New > Metadata. The New Metadata window displays.
-
Select azure.service.bus > Microsoft Azure Service Bus, then click Next.
-
Type a name for the metadata model and click Finish. The metadata is created.
Set metadata properties
Open the metadata, select the namespace node, and go to the Standard tab to set properties. The following properties must be set:
Property | Description |
---|---|
Name |
Namespace display name in Designer. |
Module |
The Designer module in use for this metadata. |
Connection String |
Full namespace connection string for identification with a Shared Access Signature (SAS) policy. |
Create processes
You can create or modify processes using Azure Service Bus actions available in the Connectors tab of the Process Palette.
Actions
The Microsoft Azure Service Bus component adds the following Process actions:
Action | Description |
---|---|
Creates a queue in the current Azure Service Bus namespace. |
|
Deletes a queue in the current Azure Service Bus namespace. |
|
Sends Azure Service Bus messages in a specified queue. |
|
Receives Azure Service Bus messages in a specified queue. |
Create or delete queues
To create or delete a message queue in a process, add the Azure Service Bus Create Queue or Azure Service Bus Delete Queue actions to a process, then set up the actions:
-
Drag and drop a namespace metadata or a queue node onto the action.
-
If you dragged and dropped a namespace metadata, configure the Queue Name parameter.
-
Optionally, toggle the checkbox Fail if exists/not exists to continue on action failure.
-
Link the action to other parts of the process.
Send messages
To send messages, add the Azure Service Bus Send Message action to your process, then set up the action:
-
Drag and drop a namespace metadata or a queue node onto the action.
-
If you dragged and dropped a namespace metadata, configure the Queue Name parameter.
-
Define the message to be sent in the Expression Editor.
-
Link the action to other parts of the process.
Receive messages
To receive messages from a queue, add the Azure Service Bus Receive Message action to your process, then set up the action:
-
Drag and drop a namespace metadata or a queue node onto the action.
-
If you dragged and dropped a namespace metadata, configure the Queue Name parameter.
-
Set the Max Messages and Max wait time parameters.
-
Link the action to other parts of the process.
This action exposes received messages as a bind, and must be linked to a target action with a bind link. The target action can retrieve various message information, exposed as the following variables:
-
MESSAGE_ID
: unique id linked to the message -
CREATION_TIME
: timestamp representing when a message was inserted into the queue. -
MESSAGE_CONTENT
: body of the message. -
SEQUENCE_NUMBER
: position of the message in the queue.