azure.azcollection.azure_service_bus event source – Receive events from an Azure service bus.

Note

This EDA event source plugin is part of the azure.azcollection collection (version 4.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install azure.azcollection.

To use it in a playbook, specify: azure.azcollection.azure_service_bus.

Synopsis

  • An ansible-rulebook event source module for receiving events from an Azure service bus.

  • In order to get the service bus and the connection string, refer to https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-python-how-to-use-queues?tabs=passwordless

  • Each event is assigned a valid RFC 4122 UUID under meta.uuid.

  • If the message_id from Azure Service Bus is already a valid UUID it is used directly.

  • If the message_id is not a valid UUID, a deterministic UUID5 is generated from queue_name and sequence_number (broker-assigned, unique within the queue) to ensure uniqueness within the configured queue. The original value is always preserved under meta.message_id.

Parameters

Parameter

Comments

conn_str

string / required

The connection string to connect to the Azure service bus.

eda_feedback_queue

string

Provided automatically by ansible-rulebook when the feedback parameter is enabled, this parameter utilizes an asyncio.Queue. It allows the system to wait for confirmation that an event has been safely persisted in the database before removing it from the event bus. Users do not need to provide a value for this manually.

feedback

boolean

Should the source plugin wait for feedback before processing the next event from the Azure Event Hub This flag allows ansible rulebook to pass in an asyncio queue which is passed in the args[‘eda_feedback_queue’] The source plugin should wait for the response to come back on this queue before it picks the next event from Azure Event Hub.

Choices:

  • false ← (default)

  • true

feedback_timeout

integer

Timeout in seconds to wait for feedback from the rule engine before raising an exception. Only applies when feedback is enabled.

Default: 120

logging_enable

boolean

Whether to turn on logging.

Choices:

  • false

  • true ← (default)

queue_name

string / required

The name of the queue to pull messages from.

Examples

- azure.azcollection.azure_service_bus:
    conn_str: "{{connection_str}}"
    queue_name: "{{queue_name}}"