azure_service_bus_queue
This component is experimental and therefore subject to change or removal outside of major version releases.
Consume messages from an Azure Service Bus Queue.
Introduced in version 1.13.0.
- Common
- Advanced
# Common config fields, showing default values
input:
label: ""
azure_service_bus_queue:
connection_string: ""
namespace: ""
queue: "" # No default (required)
# All config fields, showing default values
input:
label: ""
azure_service_bus_queue:
connection_string: ""
namespace: ""
queue: "" # No default (required)
max_in_flight: 10
auto_ack: false
nack_reject_patterns: []
renew_lock: true
Consume messages from an Azure Service Bus Queue using AMQP 1.0 protocol.
Authentication
Either connection_string or namespace must be provided. When using namespace, the default Azure credentials will be used.
Metadata
This input adds the following metadata fields to each message:
- service_bus_message_id
- service_bus_sequence_number
- service_bus_enqueued_time
- service_bus_delivery_count
- service_bus_locked_until
- service_bus_lock_token
- service_bus_expires_at
- service_bus_content_type
- service_bus_correlation_id
- service_bus_reply_to
- service_bus_reply_to_session_id
- service_bus_session_id
- service_bus_to
- service_bus_user_properties (flattened)
You can access these metadata fields using function interpolation.
Fields
connection_string
The Service Bus connection string. This can be obtained from the Azure portal. If not provided, namespace and default credentials will be used.
Type: string
Default: ""
# Examples
connection_string: Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=...
namespace
The Service Bus namespace. Required when connection_string is not provided.
Type: string
Default: ""
# Examples
namespace: myservicebus.servicebus.windows.net
queue
The name of the Service Bus queue to consume from.
Type: string
max_in_flight
The maximum number of unprocessed messages to fetch at a given time.
Type: int
Default: 10
auto_ack
Whether to automatically acknowledge messages as they are consumed rather than waiting for acknowledgments from downstream. This can improve throughput but at the cost of eliminating delivery guarantees.
Type: bool
Default: false
nack_reject_patterns
A list of regular expression patterns whereby if a message that has failed to be delivered by Bento has an error that matches it will be nacked (or sent to dead letter queue if configured). By default failed messages are nacked with requeue enabled.
Type: array
Default: []
# Examples
nack_reject_patterns:
- ^reject me please:.+$
renew_lock
Automatically renew message locks to prevent lock expiration during processing. Useful for long-running message processing.
Type: bool
Default: true