ASB Producer
In this article
Overview
ASB Producer is a Write-type Snap that allows you to send messages to a queue in Azure Service Bus (ASB).
Prerequisites
A valid Azure Service Bus account.
Valid Namespace and SharedAccessKey in Azure Service Bus.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document
|
|
| A key-value pair for the message. |
Output | Document |
|
The Consumer Snap is decoupled from the Producer Snap. | Message records. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap Settings
Asterisk (*): Indicates a mandatory field.
Suggestion icon ( ): Indicates a list that is dynamically populated based on the configuration.
Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon ( ): Indicates that you can add fields in the field set.
Remove icon (): Indicates that you can remove fields from the field set.
Field Name | Field Type | Field Dependency | Description |
---|---|---|---|
Label* | String | N/A | Specify a unique name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline. Default Value: ASB Producer |
Destination Type | Dropdown list | Enables Queue and Topic fields. | Choose an option where the messages should be sent. Available options are:
|
Queue | String/Expression | Enabled on selecting QUEUE for Destination Type. | Specify the name of the queue to which the message should be added. Alternatively, click the Suggestion icon to get the list of Queues corresponding to the Azure Service Bus account and select a Queue. Default Value: N/A |
Topic | String/Expression | Enabled on selecting TOPIC for Destination Type. | Specify the topic to which the message should be published or subscribed. Alternatively, click the Suggestion icon to fetch the list of Topics corresponding to the Azure Service Bus account and select a Topic. Default Value: N/A |
Message value | String/Expression | N/A | Specify the message value (content of the message) to send. Default Value: N/A |
Content Type | Dropdown list | N/A | Choose the content type for the message:
Default Value: APPLICATION_JSON You can overwrite the content type chosen here by providing advanced properties. |
Message Properties
| Use this field set to define message properties. This field set contains the following fields:
| ||
Properties | Dropdown list | N/A | Choose the type of the message property to route messages to particular destinations. Available options are:
Default Value: Message ID |
Values | String/Expression | N/A | Specify the value of the message property. Default Value: N/A |
Custom Properties | Use this field set to provide custom properties in key-value pairs. Click to add key-value pairs. Enter each pair in a separate row.
| ||
Key | String/Expression | N/A | Specify the key for the custom property. Default Value: N/A |
Values | String/Expression | N/A | Specify a value for the key. Default Value: N/A |
Max Batch Size (in bytes) | Integer | N/A | Specify the maximum size (in bytes) of a batch of messages to process. Default Value: -1 |
Schedule Message Date (yyyy-MM-ddTHH:mm:ss[+/-]xx:xx) | String/Expression | N/A | Specify the time and date at which the message should be sent to ASB. The time and date format must be in OFFSET_DATE_TIME format ( Default Value: N/A |
Snap Execution | Dropdown list | N/A | Select one of the three modes in which the Snap executes. Available options are:
Default Value: Execute only |
Examples
Sending Messages to a Queue
This example Pipeline demonstrates how to send messages to a queue in Azure Service Bus.
First, configure the Sequence Snap to specify the number of documents to write in the stream.
Next, configure the ASB Producer Snap as follows to write messages to a queue.
After validating the Pipeline, the ASB Producer Snap writes the messages to the queue. You can view the status of the messages sent in the output preview as follows.
Sending Message to a Topic
This example Pipeline demonstrates how to write messages to a topic. First, configure the ASB Producer Snap as follows.
After validating the Pipeline, the Snap writes the messages to the specified topic. You can view the status of the messages sent in the output preview.
Sending Messages as per the Schedule
This example Pipeline demonstrates how to schedule a time and date to send messages in ASB. To do so, configure the ASB Producer Snap with the time and date when the message should be sent as follows.
After validating the Pipeline, the Snap sends the message in ASB according to the specified schedule.
Downloads
Snap Pack History
Related Content
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.