A Python client for ActiveMQ REST API
Project description
ActiveMQ API Client
A Python client for interacting with the ActiveMQ REST API.
Installation
Install the package via pip:
pip install activemq-api-client
Usage
After installing the package, you can use it to interact with the ActiveMQ REST API.
Example
from activemq_api_client.client import ActiveMQClient
# Create an instance of the ActiveMQClient
client = ActiveMQClient("http://localhost:8161", "admin", "admin")
# Send a message to a queue
response = client.send_message("test-queue", "test message")
# Print the response status code
print(response)
In this example, we create an instance of the ActiveMQClient
class and then use the send_message
method to send a message to the "test-queue" queue. The send_message
method returns the HTTP response status code, which is then printed to the console.
Methods
send_message(queue_name, message)
Sends a message to the specified queue.
Parameters:
queue_name
(str): The name of the queue.message
(str): The message content.
Returns:
int
: The HTTP response status code.
License
This package is released under the MIT License. See the LICENSE
file for more details.
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
Close
Hashes for activemq-api-client-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75b6d4934a4279a07263eabbf3d6088106a2f13009f8862eda39736ef58978d9 |
|
MD5 | a156d40e95144ed62e5979ac24fecc86 |
|
BLAKE2b-256 | 73f4eee2b786febbf5baf3551362e4c9ff07f4a75e79b88fcbf3a7b708684977 |
Close
Hashes for activemq_api_client-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bd256c21291715df023a6f0eb84cdabb171730ce5ea4d229b817198959d3ffb |
|
MD5 | d4f0edc681061c330c5c3c82517ab333 |
|
BLAKE2b-256 | a524c9c2c3a945188eb4e5618ca14d62391fbea8777086101335d5238d3acd55 |