Skip to main content

Azure Service Bus Connector

note

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 nameDescription
_Azure_Send ServiceBusDefines the settings for sending messages to a Service Bus queue in Azure.
_Azure_ServiceBus ListenerDefines 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 nameDefault valueDescription
ConnectionStringThe connection string to the Service Bus, including account key for authentication. See also note below.
DelayBetweenRetryAttempts1The delay (in seconds) between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach.
MaxDelayTime60The maximum permissible delay (in seconds) between retry attempts.
MaxRetries3The maximum number of retry attempts before considering the associated operation as failed.
RetryModeFixedThe approach to use for calculating retry delays. Can be either Fixed or Exponential.

  • Fixed – Retry attempts happen at fixed intervals and each delay is a consistent duration.
  • Exponential – Retry attempts will delay based on a backoff strategy, where each attempt increases the waiting period before retrying.
ServiceBus queue nameAzure Service Bus queue name.
TryTimeout60The maximum time (in seconds) to wait for completion of a single attempt, whether the initial attempt or a retry.

_Azure_ServiceBus Listener

Attribute nameDefault valueDescription
ConnectionStringThe connection string to the Service Bus, including account key for authentication. See also note below.
Create outnodeYCreate outnode for messages received. Y/N
Delay30Specifies how often the connector reads from the Service Bus message queue (seconds)
Event on created NodeEvent type to set on the outnode
Max concurrent calls1The 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 TypenoneNode type set on outnode
Node Type VersionnoneNode type version set on outnode
PartnernonePartner identity set on the outnode.
Prefetch count0Number 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 nameAzure Service Bus queue name
note

The connection string should be on the following foramt: DefaultEndpointsProtocol=defaultEndpointsProtocol;AccountName=accountName;AccountKey=AccountKey;EndpointSuffix=EndpointSuffix

note
  • 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.

note

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

  1. Export your iCore system to a backup file.
  2. Import the Azure Connector Service Bus package.
  3. Compile Workflows _Azure_ServiceBus Listener and _Azure_Send ServiceBus.
  4. Create a new Partner where _Azure_ServiceBus Template is used as template Partner.
  5. 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.
  6. 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.

See Also

Azure Blob Storage
Azure Event Hub