AMQPStorm Documentation
Thread-safe Python3 RabbitMQ Client & Management library.
Installation
The latest version can be installed using pip and is available on PyPI.
pip install amqpstorm
You can also install AMQPStorm with the management dependencies:
pip install amqpstorm[management]
Basic Example
with amqpstorm.Connection('rmq.eandersson.net', 'guest', 'guest') as connection:
with connection.channel() as channel:
channel.queue.declare('fruits')
message = amqpstorm.Message.create(
channel, body='Hello RabbitMQ!', properties={
'content_type': 'text/plain'
})
message.publish('fruits')
Additional Examples
A wide variety of examples are available on GitHub.
Usage
- Connection
- UriConnection
- Channel
ChannelChannel.__init__()Channel.basicChannel.exchangeChannel.queueChannel.txChannel.build_inbound_messages()Channel.close()Channel.check_for_errors()Channel.check_for_exceptions()Channel.confirm_deliveries()Channel.confirming_deliveriesChannel.process_data_events()Channel.start_consuming()Channel.stop_consuming()Channel.__new__()
- Channel.Basic
- Channel.Exchange
- Channel.Queue
- Channel.Tx
- Exceptions
- Message
MessageMessage.__init__()Message.create()Message.bodyMessage.channelMessage.methodMessage.propertiesMessage.ack()Message.nack()Message.reject()Message.publish()Message.app_idMessage.message_idMessage.content_encodingMessage.content_typeMessage.correlation_idMessage.delivery_modeMessage.timestampMessage.priorityMessage.reply_toMessage.message_typeMessage.expirationMessage.user_idMessage.redeliveredMessage.delivery_tagMessage.json()
Management API Usage
- Management Api
ManagementApiManagementApi.__init__()ManagementApi.basicManagementApi.channelManagementApi.connectionManagementApi.exchangeManagementApi.healthchecksManagementApi.queueManagementApi.userManagementApi.virtual_hostManagementApi.aliveness_test()ManagementApi.cluster_name()ManagementApi.node()ManagementApi.nodes()ManagementApi.overview()ManagementApi.top()ManagementApi.whoami()ManagementApi.__new__()
BasicChannelConnectionExchangeHealthChecksQueueUserVirtualHost
- Management Api Exceptions
Examples
Issues
Please report any issues on GitHub.
Source
AMQPStorm source code is available on GitHub.