Example:
from taskiq_service_bus import ServiceBusBroker
SERVICE_BUS_CONNECTION_STRING = "your_connection_string_here"
broker = ServiceBusBroker(SERVICE_BUS_CONNECTION_STRING, "my-queue")
@broker.task
def example_task():
print("Task executed successfully")connection_string- Service Bus Namespace connection string. Instructions on how to find it can be found here: Get the connection stringqueue_name- Name of the Service Bus queue to usemax_lock_renewal_duration- Maximum message lock renewal duration in seconds. Optional, defaults to 300.result_backend- Result backend to use. Optional.task_id_generator- custom task ID generator function. Optional, if not provided, taskiq will useuuid4.