uamqp Package
Packages
| async_ops | |
| authentication |
Modules
| address | |
| c_uamqp | |
| client | |
| compat | |
| connection | |
| constants | |
| errors | |
| message | |
| mgmt_operation | |
| receiver | |
| sender | |
| session | |
| types | |
| utils |
Functions
get_platform_info
receive_message
Receive a single message from an AMQP endpoint.
receive_message(source, auth=None, timeout=0, debug=False)
Parameters
- auth
- AMQPAuth
The authentication credentials for the endpoint. This should be one of the subclasses of uamqp.authentication.AMQPAuth. Currently this includes:
uamqp.authentication.SASLAnonymous
uamqp.authentication.SASLPlain
uamqp.authentication.SASTokenAuth
If no authentication is supplied, SASLAnnoymous will be used by default.
- timeout
The timeout in milliseconds after which to return None if no messages are retrieved. If set to 0 (the default), the receiver will not timeout and will continue to wait for messages until interrupted.
- debug
- bool
Whether to turn on network trace logs. If True, trace logs will be logged at INFO level. Default is False.
Return type
receive_messages
Receive a batch of messages from an AMQP endpoint.
receive_messages(source, auth=None, max_batch_size=None, timeout=0, debug=False, **kwargs)
Parameters
- auth
- AMQPAuth
The authentication credentials for the endpoint. This should be one of the subclasses of ~uamqp.authentication.AMQPAuth. Currently this includes:
uamqp.authentication.SASLAnonymous
uamqp.authentication.SASLPlain
uamqp.authentication.SASTokenAuth
If no authentication is supplied, SASLAnnoymous will be used by default.
- max_batch_size
The maximum number of messages to return in a batch. If the receiver receives a smaller number than this, it will not wait to return them so the actual number returned can be anything up to this value. If the receiver reaches a timeout, an empty list will be returned.
- timeout
The timeout in milliseconds after which to return if no messages are retrieved. If set to 0 (the default), the receiver will not timeout and will continue to wait for messages until interrupted.
- debug
- bool
Whether to turn on network trace logs. If True, trace logs will be logged at INFO level. Default is False.
Return type
send_message
Send a single message to AMQP endpoint.
send_message(target, data, auth=None, debug=False)
Parameters
- auth
- AMQPAuth
The authentication credentials for the endpoint. This should be one of the subclasses of uamqp.authentication.AMQPAuth. Currently this includes:
uamqp.authentication.SASLAnonymous
uamqp.authentication.SASLPlain
uamqp.authentication.SASTokenAuth
If no authentication is supplied, SASLAnnoymous will be used by default.
- debug
- bool
Whether to turn on network trace logs. If True, trace logs will be logged at INFO level. Default is False.
Returns
A list of states for each message sent.
Return type
Feedback
Submit and view feedback for