Azure Service Bus Connector
For information about setting up and configuring a Service Bus in Azure, see Azure product documentation for Service Bus.
This package provides functionality to send messages and listen for incoming messages in Azure Service Bus. The configuration is made on a Partner in iCIS, divided into two different Partner attribute groups.
Package contents
Partner attribute groups
Attribute group name | Description |
---|---|
_Azure_Send ServiceBus | Defines the settings for sending messages to a Service Bus queue in Azure. |
_Azure_ServiceBus Listener | Defines the settings for listening for messages on a Service Bus queue in Azure. |
Parameters and attributes
This section contains reference information about the parameters and attributes used in the Azure Service Bus Connector package. The template Partner is called _Azure_ServiceBus Template
. It has the following attribute groups:
_Azure_Send ServiceBus
Attribute name | Default value | Description |
---|---|---|
ConnectionString | The connection string to the Service Bus, including account key for authentication. See also note below. | |
DelayBetweenRetryAttempts | 1 | The delay (in seconds) between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach. |
MaxDelayTime | 60 | The maximum permissible delay (in seconds) between retry attempts. |
MaxRetries | 3 | The maximum number of retry attempts before considering the associated operation as failed. |
RetryMode | Fixed | The approach to use for calculating retry delays. Can be either Fixed or Exponential.
|
ServiceBus queue name | Azure Service Bus queue name. | |
TryTimeout | 60 | The maximum time (in seconds) to wait for completion of a single attempt, whether the initial attempt or a retry. |
_Azure_ServiceBus Listener
Attribute name | Default value | Description |
---|---|---|
ConnectionString | The connection string to the Service Bus, including account key for authentication. See also note below. | |
Create outnode | Y | Create outnode for messages received. Y/N |
Delay | 30 | Specifies how often the connector reads from the Service Bus message queue (seconds) |
Event on created Node | Event type to set on the outnode | |
Max concurrent calls | 1 | The maximum number of concurrent calls to the listener. If a large volume of messages is expected over a short period of time, this number can be increased to achieve better performance. |
Node Type | none | Node type set on outnode |
Node Type Version | none | Node type version set on outnode |
Partner | none | Partner identity set on the outnode. |
Prefetch count | 0 | Number of messages that will be prefetched from the queue and queued locally. In specific cases, letting the listener receive messages from a local cache instead of waiting for a service request can improve performance. |
ServiceBus queue name | Azure Service Bus queue name |
The connection string should be on the following foramt:
DefaultEndpointsProtocol=defaultEndpointsProtocol;AccountName=accountName;AccountKey=AccountKey;EndpointSuffix=EndpointSuffix
- If you only require functionality for receiving messages from a Service bus, it is enough to set the values in the
_Azure_ServiceBus Listener
group. - If you only require functionality for sending messages to a Service bus, it is enough to set the values in the
_Azure_Send ServiceBus
group.
Workflows
The sender and listener can be managed in Workflows or WebAPIs. The package contains templates for Workflows. Both templates require the name of a configured Partner is passed as as Run, Init or Event parameter.
_Azure_Send ServiceBus
This template Workflow sends a message to the Service Bus queue. It executes when the event _Azure_Send ServiceBus
is fired on a Node in iCIS. The Node content is then sent to the Service Bus queue.
_Azure_ServiceBus Listener
This template Workflow runs a listener that fetches incoming messages on the Service Bus queue. It starts by firing the event _Azure_Initiate ServiceBus Startup
and stays active indefinitely or until the iCore system stops. For each message the listener receives, a Node is created in iCIS.
If the number of messages is expected to be high, you may need to consider a different approach for handling the received messages. Creating a Node for each and every message may be unsustainable.
Setting up the package
- Export your iCore system to a backup file.
- Import the Azure Connector Service Bus package.
- Compile Workflows
_Azure_ServiceBus Listener
and_Azure_Send ServiceBus
. - Create a new Partner where
_Azure_ServiceBus Template
is used as template Partner. - Edit the settings on newly created Partner.
- To enable sending of messages to an Azure Service Bus queue, configure the settings under
_Azure_Send ServiceBus
attribute group. - To enable listening for messages on an Azure Service Bus queue, configure the settings under
_Azure_ServiceBus Listener
attribute group.
- To enable sending of messages to an Azure Service Bus queue, configure the settings under
- Restart the iCore system.
Running the connector
Once you have set up the package, you can start sending messages to, or listening for messages on, an Azure Service Bus. These actions are triggered by iCore events.
Sending messages to Azure Service Bus
Sending of messages is triggered when the Event _Azure_Send ServiceBus
is fired on a Node in iCore. The Node content will then be sent to the Service Bus queue. The identity of the Partner that holds the configuration for sending messages to Azure Service Bus is to be passed as a Run or Event parameter.
Listening for messages on Azure Service Bus
The listener for messages on a Service Bus queue starts when the Event _Azure_Initiate ServiceBus Startup
is fired in iCore. The identity of the Partner that holds the configuration for listening for messages is to be passed as a Run or Event parameter. The listener will run for as long the iCore system is running.