SessionAsync Class
An asynchronous AMQP Session. A Connection can have multiple Sessions, and each Session can have multiple Links. An async Session must be used with an async Connection.
- Inheritance
-
SessionAsync
Constructor
SessionAsync(connection, incoming_window=None, outgoing_window=None, handle_max=None, on_attach=None, loop=None)
Parameters
- on_attach
- <xref:func>[Source, Target, dict, AMQPConnectionError]
A callback function to be run on receipt of an ATTACH frame. The function must take 4 arguments: source, target, properties and error.
- loop
Variables
- incoming_window
- int
The size of the allowed window for incoming messages.
- outgoing_window
- int
The size of the allowed window for outgoing messages.
- handle_max
- int
The maximum number of concurrent link handles.
Methods
| destroy_async |
Asynchronously close any open management Links and close the Session. Cleans up and C objects for both mgmt Links and Session. |
| mgmt_request_async |
Asynchronously run a request/response operation. These are frequently used for management tasks against a $management node, however any node name can be specified and the available options will depend on the target service. |
destroy_async
Asynchronously close any open management Links and close the Session. Cleans up and C objects for both mgmt Links and Session.
async destroy_async()
mgmt_request_async
Asynchronously run a request/response operation. These are frequently used for management tasks against a $management node, however any node name can be specified and the available options will depend on the target service.
async mgmt_request_async(message, operation, op_type=None, node=b'$management', **kwargs)
Parameters
The type of operation to be performed. This value will be service-specific, but common values include READ, CREATE and UPDATE. This value will be added as an application property on the message.
The type on which to carry out the operation. This will be specific to the entities of the service. This value will be added as an application property on the message.
- timeout
- float
Provide an optional timeout in milliseconds within which a response to the management request must be received.
Provide an alternate name for the status code in the response body which can vary between services due to the spec still being in draft. The default is b"statusCode".
Provide an alternate name for the description in the response body which can vary between services due to the spec still being in draft. The default is b"statusDescription".
Return type
Attributes
loop
Feedback
Submit and view feedback for