Using the Azure Service Bus Destination Component 

The Azure Service Bus Destination Component is an SSIS data flow pipeline component that can be used to send messages to an Azure Service Bus queue, topic or event hub. There are three pages of configuration:

  • General
  • Columns
  • Error Handling

General page

SSIS Azure Service Bus Destination

Connection Manager

The destination component requires an active connection to Azure Service Bus. The Connection Manager drop-down will show a list of all Azure Service Bus Connection Managers that have been created in the current SSIS package. 

Entity Type:

If an active connection manager is selected it will be possible to select an entity to connect to. The options are Queue, Topic and Event Hub.

Queue 

If the Entity Type property is set to Queue a list of queues will be presented from those available in Azure Service Bus. Messages will be written to this queue.

Topic

If the Entity Type property is set to Topic a list of topics will be presented from those available in Azure Service Bus. Messages will be written to this topic.

Event Hub

If the Entity Type property is set to Event Hub a list of event hubs will be presented from those available in Azure Service Bus. Events will be sent to this event hub.

Message Time To Live

Messages written to Azure Service Bus can have a time to live property set which is a number of seconds after which they will expire and be removed from the queue. Setting this value to 0 will not set the time to live.

Refresh Component Button

Clicking the Refresh Component button causes the component to retrieve the latest metadata and update each field to its most recent metadata. It will remove any custom fields that have been added on the columns page.

Map Unmapped Fields Button

By clicking this button, the component will try to map any unmapped attributes by matching their names with the input columns from upstream components. This is useful when your source component has recently added more columns, in which case you can use this button to automatically establish the association between input columns and unmapped destination attributes.

Clear All Mappings Button 

By clicking this button, the component will reset all your mappings in the destination component.

Columns page

The Columns page allows you to map the columns from upstream components to destination attributes.

In the Columns page, you will see a grid as shown below.

SSIS Azure Service Bus Destination - columns

  • Input Column - You can select an input column from an upstream component here. 
  • Destination Field - The attribute/field that you want to write data to. 
  • Data Type - This column indicates the type of value for the current attribute. 
  • Unmap - This button provides a convenient way to unset the mapping for the selected attribute/field. 

Add Button

Clicking the Add button will bring up a dialog that will allow custom fields to be added. Custom fields can be used for values of any custom properties on the written messages.

Error Handling page 

The Error Handling page allows you to specify how errors should be handled when they happen. 

SSIS Azure Service Bus Destination - error handling

There are three options available. 

  1. Fail on error
  2. Redirect rows to error output
  3. Ignore error

When the Redirect rows to error output option is selected, rows that failed to write to Azure Service Bus will be redirected to the 'Error Output' of the Destination Component. As indicated in the screenshot below, the green output connection represent rows that were successfully written, and the red 'Error Output' connection represents rows that were erroneous. The 'AzureServiceBusErrorMessage' output column found in the 'Error Output' may contain the error message that was reported by Azure Service Bus or the component itself. 

SSIS Azure Service Bus Destination - error output

NOTE: Use extra caution when selecting Ignore error option, since the component will remain silent for any errors that have occurred.