tessl install tessl/pypi-azure-servicebus@7.14.0Microsoft Azure Service Bus Client Library for Python providing comprehensive messaging capabilities for enterprise applications.
Agent Success
Agent success rate when using this tile
92%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.01x
Baseline
Agent success rate without this tile
91%
A utility module for building Azure Service Bus messages with rich metadata and properties for a notification system.
The module provides a function to build notification messages with appropriate routing and identification properties.
The module supports adding custom metadata to messages via application properties.
The module supports setting time-based properties for message lifecycle management.
The module supports session-based messaging for ordered processing.
@generates
from typing import Dict, Any, Optional
from datetime import datetime, timedelta
from azure.servicebus import ServiceBusMessage
def build_notification_message(
notification_data: Dict[str, Any],
time_to_live: Optional[int] = None,
scheduled_time: Optional[datetime] = None
) -> ServiceBusMessage:
"""
Build a Service Bus message from notification data with appropriate properties.
Args:
notification_data: Dictionary containing:
- type: str - notification type (e.g., "email", "sms")
- recipient: str - recipient identifier
- content: str - notification content
- notification_id: str - unique notification identifier
- priority: Optional[str] - priority level
- tags: Optional[List[str]] - tags for categorization
- session_id: Optional[str] - session identifier for ordered processing
- reply_to_session_id: Optional[str] - reply-to session identifier
time_to_live: Optional time-to-live in seconds
scheduled_time: Optional scheduled delivery time
Returns:
ServiceBusMessage with all properties configured
"""
passProvides Azure Service Bus messaging client and message types.
@satisfied-by