A CLI tool for interacting with Azure Service Bus Queues
Project description
Azure Service Bus CLI
azure-servicebus-cli
is a simple command-line interface (CLI) tool for interacting with Azure Service Bus Queues. This tool allows you to send and receive messages from an Azure Service Bus Queue using a few straightforward commands.
Installation
To install the azure-servicebus-cli
package, use pip
:
pip install azure-servicebus-cli
Prerequisites
Before using the CLI tool, make sure you have:
- An Azure Service Bus namespace and queue created in your Azure account.
- The connection string for your Azure Service Bus. You can obtain this from the Azure portal.
Environment Variable
Set the AZURE_SERVICEBUS_CONNECTION_STRING
environment variable with your Service Bus connection string:
export AZURE_SERVICEBUS_CONNECTION_STRING="your-connection-string"
Usage
Sending a Message
You can send a message to a specified queue using the send
command. You can directly pass a message or provide a path to a file containing the message content.
Example 1: Send a Message Directly
azsb send --queue <your-queue-name> --message "Your message here"
Example 2: Send a Message from a File
azsb send --queue <your-queue-name> --message /path/to/your/message.json
Receiving Messages
You can receive messages from a specified queue using the receive
command. You can also specify the maximum number of messages to receive.
Example 1: Receive a Single Message
azsb receive --queue <your-queue-name>
Example 2: Receive Multiple Messages
azsb receive --queue <your-queue-name> --max-number-of-messages 10
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file azure_servicebus_cli-0.1.2.tar.gz
.
File metadata
- Download URL: azure_servicebus_cli-0.1.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9a9780c204804490c17c638e3bcc55c92199339e55154320c634ddc8b8f04ad |
|
MD5 | d49d2417599ff8b3fb9606cf951dea98 |
|
BLAKE2b-256 | ff9aa8711532794c744b4952f93441c2f12c728ab3c8243dd6cda704b23c1bd1 |
File details
Details for the file azure_servicebus_cli-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: azure_servicebus_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3b8aca12e3811bc20a7f5d97cb9d2416bcc183af54be12a7f0803e8473b7198 |
|
MD5 | 400b2044208211fc021ba577e6605f3f |
|
BLAKE2b-256 | dc3e3d04c1e43d57c92c535cdf56e20b856949897ed38a7c7e3dc8d4725255ed |