In this article
Overview
ASB Consumer is a Read-type Snap that reads messages from Azure Service Bus (ASB).
Prerequisites
A valid Azure Service Bus account.
Valid Namespace and SharedAccessKey in ASB.
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 document containing a message or topic. |
Output | Document |
|
| The message data with key or value parameters and metadata. |
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* Default Value: ASB Consumer | String | N/A | Specify the 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. |
Destination Type Default Value: QUEUE | Dropdown list | Enables Queue, Topic, and Subscription fields. | Choose an option to which the message needs to be sent. Available options are:
|
Queue Default Value: N/A | String/Expression/Suggestion | Appears when you select QUEUE for Destination Type. | Specify the queue from which the message should be consumed in ASB. Alternatively, click the Suggestion icon to fetch the list of queues corresponding to the Azure Service Bus account and select a queue. |
Topic Default Value: N/A | String/Expression/Suggestion | Appears when you select TOPIC for Destination Type. | Specify the topic from which the message should be consumed in ASB. Alternatively, click the Suggestion icon to fetch the list of topics corresponding to the Azure Service Bus account and select a topic. |
Subscription Default Value: N/A | String/Expression/Suggestion | Appears when you select TOPIC for Destination Type. | Specify the subscription for the topic. Alternatively, click the Suggestion icon to fetch the list of Subscriptions for the topic corresponding to the Azure Service Bus account and select a Subscription. |
Processing Mode Default Value: ASYNCHRONOUS | Dropdown list | Appears when you select QUEUE for Destination Type. | Select the processing mode to make calls to Azure Service Bus. The available options are:
|
Prefetch Count Default Value: 0 | Integer/Expression | Appears when you select ASYNCHRONOUS for Processing Mode. | Specify the number of messages to be read into the buffer before the Snap begins processing. If the field is left empty, the Snap sets it to 0. Incrementing the prefetch count improves the overall performance of the ASB Consumer Snap. The prefetch count can be from 0 (disabled) to 5. If you enter a value that exceeds the recommended limit of 5, a Lint warning is displayed in the pipeline statistics. |
Count Down Latch Timeout (in seconds) Default Value: 1 | Integer/Expression | Appears when you select ASYNCHRONOUS for Processing Mode. | Specify the time interval in seconds to receive the messages. To read messages constantly from ASB in Asynchronous mode, you must set the Count Down Latch Timeout (in seconds) to 0 or -1. |
Acknowledgment Type Default Value: Acknowledge Message | Dropdown list | Appears when you select ASYNCHRONOUS for Processing Mode. | Select an option for the Acknowledgement type to determine the action on the received messages. Select the action to take on the received message The available options are:
|
Max Message Count Default Value: -1 | Integer/Expression | Appears when you select SYNCHRONOUS for Processing Mode. | Specify the maximum number of messages to read before the Consumer stops. If you provide a negative value, the Snap continuously reads messages. |
Max Idle Time (in seconds) Default Value: 120 | Integer/Expression | Appears when you select SYNCHRONOUS for Processing Mode. | Specify the maximum idle time (in seconds) before the Snap stops to wait for messages. |
Batch Pooling Default Value: Deselected | Checkbox | Appears when you select SYNCHRONOUS for Processing Mode. | Select this checkbox to pool multiple messages in a batch. |
Max Messages (per poll) Default Value: 1 | Integer/Expression | Appears when you select Batch Pooling. | Specify the maximum number of messages to read for each poll. |
Polling Interval (in milli seconds) Default Value: N/A | Integer/Expression | Appears when you select Batch Pooling. | Specify the time (in milliseconds) to wait between polls for messages. |
Message Acknowledge Mode Default Value: AUTO_ACKNOWLEDGE | Dropdown list | Appears when you select SYNCHRONOUS for Processing Mode. | Choose the mode for acknowledging messages in non-transaction sessions.
|
Acknowledgement wait time (in milliseconds)
Default Value: 10 | Integer | Appears when you select PIPELINE_CONTROL for Message Acknowledge Mode. | Specify the duration for which the Snap should wait to receive acknowledgments from the ASB Acknowledgement Snap. We recommend you to leave this field empty to ensure accurate acknowledgment of every message. |
Max Auto-lock Renew Duration (in seconds) Default Value: 60 | Integer/Expression | Appears when you select QUEUE for Destination Type. | Specify the maximum time (in seconds) to renew the message lock’s expiration. The maximum time should be in sync with message lock duration in the queue/topic. By default this is set to 60 seconds. We recommend that you set the maximum time to a value slightly greater than message lock duration for queue/topic, because even after the message lock duration is exhausted, you can still renew the lock to process the message. |
Snap Execution Default Value: Validate & Execute | Dropdown list | N/A | Select one of the three modes in which the Snap executes. Available options are:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
Exception occurred while processing the message. | Cannot configure more than one Consumer Snap within the same Pipeline with Message acknowledge mode as PIPELINE_CONTROL | Verify the connection settings and provide values for the input properties. |
Examples
Consume Messages from Azure Service Bus
This example pipeline demonstrates how to read messages from ASB using the ASB Consumer Snap.
Step 1: Configure the ASB Consumer Snap to consume messages from the queue.
After validating the pipeline, you can see the details of the messages that are read in the output preview of the Snap as follows.
Step 2: Configure the Mapper Snap to extract the values of Message id
, Sequence number
, and Lock token
(as highlighted in the screenshot) from the output of the upstream Snap.
The Mapper Snap returns the output as follows.
Step 3: Configure the ASB Acknowledge Snap to acknowledge the messages that are received.
Consume Messages and Writing To Topic
This example pipeline demonstrates how to use the ASB Consumer Snap to read and write messages to a topic.
Configure the ASB Consumer Snap to send messages to a topic.
After validating the Pipeline, you can see the output in the Snap’s preview. After executing the Pipeline, the consumed messages are written to the topic.
Downloads
Important Steps to Successfully Reuse Pipelines
Download and import the Pipeline into SnapLogic.
Configure Snap accounts as applicable.
Provide Pipeline parameters as applicable.
Snap Pack History
Release | Snap Pack Version | Date | Type | Updates |
---|---|---|---|---|
November 2024 | main29029 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
August 2024 | main27765 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
May 2024 | 437patches26578 |
| Latest | Fixed an issue with the Azure Service Bus Account that exposed the secret key when an |
May 2024 | main26341 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
February 2024 | 436patches25419 |
| Latest | Fixed an issue with the ASB Producer Snap that could not set the key-value pairs in the Custom Properties field when configuring the Topic or Queue fields to Azure Service Bus. |
February 2024 | main25112 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
November 2023 | main23721 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
August 2023 | main22460 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
May 2023 | 433patches22297 |
| Latest | Fixed the asynchronous message processing issue in the ASB Consumer Snap by enabling the upper range of value for the Prefetch Count field to five. When the value exceeds five, the Snap displays a lint warning in the pipeline execution statistics. |
May 2023 | main21015 | Stable | Upgraded with the latest SnapLogic Platform release. | |
February 2023 | 432patches20035 | Latest | Fixed an issue that caused the following message to display when clicking on the Suggest icon: | |
February 2023 | main19844 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
November 2022 | main18944 | 10 Nov 2022 | Stable | Upgraded with the latest SnapLogic Platform release. |
August 2022 | main17386 | 11 Aug 2022 | Stable | Upgraded with the latest SnapLogic Platform release. |
4.29 | main15993 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
4.28 | main14627 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
4.27 Patch | 4.27patch14048 |
| Latest | Introduced the Azure Service Bus Snap Pack— a cloud messaging service that connects applications, devices, and services running in the cloud to any other applications or services. This Snap Pack offers the following Snaps: |