AzureServiceBusSubscriptionCreateOperator

Microsoft Azure

Create an Azure Service Bus Topic Subscription under a Service Bus Namespace by using ServiceBusAdministrationClient

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the Microsoft Azure provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

topic_nameRequiredThe topic that will own the to-be-created subscription.
subscription_nameRequiredName of the subscription that need to be created
lock_durationISO 8601 time span duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.
requires_sessionA value that indicates whether the queue supports the concept of sessions.
default_message_time_to_liveISO 8601 default message time span to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.
dead_lettering_on_message_expirationA value that indicates whether this subscription has dead letter support when a message expires.
dead_lettering_on_filter_evaluation_exceptionsA value that indicates whether this subscription has dead letter support when a message expires.
max_delivery_countThe maximum delivery count. A message is automatically dead lettered after this number of deliveries. Default value is 10.
enable_batched_operationsValue that indicates whether server-side batched operations are enabled.
forward_toThe name of the recipient entity to which all the messages sent to the subscription are forwarded to.
user_metadataMetadata associated with the subscription. Maximum number of characters is 1024.
forward_dead_lettered_messages_toThe name of the recipient entity to which all the messages sent to the subscription are forwarded to.
auto_delete_on_idleISO 8601 time Span idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes. Input value of either type ~datetime.timedelta or string in ISO 8601 duration format like “PT300S” is accepted.
azure_service_bus_conn_idReference to the Azure Service Bus connection.

Documentation

Create an Azure Service Bus Topic Subscription under a Service Bus Namespace by using ServiceBusAdministrationClient

See also

For more information on how to use this operator, take a look at the guide: Create Azure Service Bus Subscription

Was this page helpful?