or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-servicebus@7.14.x
tile.json

tessl/pypi-azure-servicebus

tessl install tessl/pypi-azure-servicebus@7.14.0

Microsoft 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%

task.mdevals/scenario-1/

Message Queue Inspector

Build a message inspection utility that allows viewing messages in a queue without removing them.

Requirements

Your utility should implement the following functionality:

Message Preview

Create a function that previews messages from a Service Bus queue without consuming them. The function should:

  • Accept a connection string and queue name as parameters
  • Return a list of message previews containing message body and basic properties
  • Not remove any messages from the queue during inspection
  • Support viewing up to a configurable number of messages (default: 10)

Sequential Message Inspection

Create a function that inspects messages starting from a specific position in the queue. The function should:

  • Accept a connection string, queue name, and starting sequence number
  • Preview messages beginning from the specified sequence number
  • Return message details without affecting message availability in the queue

Test Cases

  • Given a queue with 5 messages, previewing 3 messages returns the first 3 message bodies without removing them from the queue @test
  • Given a queue with messages having sequence numbers 100, 101, 102, inspecting from sequence number 101 returns messages 101 and 102 @test
  • Attempting to preview messages from an empty queue returns an empty list @test

Implementation

@generates

API

def preview_queue_messages(connection_string: str, queue_name: str, max_count: int = 10) -> list[dict]:
    """
    Preview messages from a queue without removing them.

    Args:
        connection_string: Azure Service Bus connection string
        queue_name: Name of the queue to inspect
        max_count: Maximum number of messages to preview (default: 10)

    Returns:
        List of dictionaries containing message body and properties
    """
    pass

def inspect_from_sequence(connection_string: str, queue_name: str, sequence_number: int, max_count: int = 10) -> list[dict]:
    """
    Inspect messages starting from a specific sequence number.

    Args:
        connection_string: Azure Service Bus connection string
        queue_name: Name of the queue to inspect
        sequence_number: Starting sequence number for inspection
        max_count: Maximum number of messages to inspect (default: 10)

    Returns:
        List of dictionaries containing message body, sequence number, and properties
    """
    pass

Dependencies { .dependencies }

azure-servicebus { .dependency }

Provides Azure Service Bus messaging capabilities for queue operations.