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%
Build a message enrichment service that adds custom metadata annotations to messages before sending them to a queue.
You're building a message processing system where each message needs to be enriched with service-specific metadata (like processing hints, routing information, or tracing data) that should be preserved separately from the message body and application properties.
Implement a message sender that:
The solution should handle both sending messages with annotations and receiving messages to verify the annotations are accessible.
@generates
def send_annotated_message(connection_string: str, queue_name: str, body: str, annotations: dict) -> None:
"""
Send a message with custom annotations to a queue.
Args:
connection_string: Service Bus connection string
queue_name: Name of the target queue
body: Message body content
annotations: Dictionary of annotation key-value pairs to add to the message
"""
pass
def receive_and_verify_annotations(connection_string: str, queue_name: str, expected_count: int) -> list:
"""
Receive messages from a queue and extract their annotations.
Args:
connection_string: Service Bus connection string
queue_name: Name of the queue to receive from
expected_count: Number of messages to receive
Returns:
List of dictionaries containing the annotations from each received message
"""
passProvides Azure Service Bus messaging capabilities.