servicebus_peek_subscription_messages_to_file
Peek messages from an Azure Service Bus topic subscription and save their bodies to a JSON file, returning metadata in the context.
Instructions
Non-destructively peek at messages in an Azure Service Bus topic subscription, saving bodies to a file.
Message bodies are written to output_file as JSON (keyed by sequence number). Only metadata (sequence number, enqueue time, properties) is returned in context — use this variant when message bodies may be large to avoid filling the context window. For session-enabled subscriptions, provide a session_id to peek a specific session. If session_id is omitted on a session-enabled subscription, the next available session is accepted, peeked, and immediately released.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| topic | Yes | ||
| subscription | Yes | ||
| output_file | Yes | ||
| max_count | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |