Source Class
Represents an AMQP Source endpoint.
Constructor
Source(address, encoding='UTF-8')
Parameters
| Name | Description |
|---|---|
|
address
Required
|
An AMQP endpoint URL. |
|
encoding
|
The encoding used if address is supplied as a str rather than bytes. Default is UTF-8. Default value: UTF-8
|
Variables
| Name | Description |
|---|---|
|
address
|
The endpoint URL. |
|
durable
|
Whether the endpoint is durable. |
|
expiry_policy
|
The endpoint expiry policy |
|
timeout
|
The endpoint timeout in seconds. |
|
dynamic
|
Whether the endpoint is dynamic. |
|
distribution_mode
|
The endpoint distribution mode. |
Methods
| from_c_obj | |
| get_filter |
Get the filter on the source. |
| set_filter |
Set a filter on the endpoint. Only one filter can be applied to an endpoint. |
from_c_obj
from_c_obj(c_value, encoding='UTF-8')
Parameters
| Name | Description |
|---|---|
|
c_value
Required
|
|
|
encoding
|
Default value: UTF-8
|
get_filter
Get the filter on the source.
get_filter(name=b'apache.org:selector-filter:string')
Parameters
| Name | Description |
|---|---|
|
name
|
The name of the filter. This will be encoded as an AMQP Symbol. By default this is set to b'apache.org:selector-filter:string'. Default value: b'apache.org:selector-filter:string'
|
set_filter
Set a filter on the endpoint. Only one filter can be applied to an endpoint.
set_filter(value, name=b'apache.org:selector-filter:string', descriptor=b'apache.org:selector-filter:string')
Parameters
| Name | Description |
|---|---|
|
value
Required
|
The filter to apply to the endpoint. Set to None for a NULL filter. |
|
name
|
The name of the filter. This will be encoded as an AMQP Symbol. By default this is set to b'apache.org:selector-filter:string'. Default value: b'apache.org:selector-filter:string'
|
|
descriptor
|
The descriptor used if the filter is to be encoded as a described value. This will be encoded as an AMQP Symbol. By default this is set to b'apache.org:selector-filter:string'. Set to None if the filter should not be encoded as a described value. Default value: b'apache.org:selector-filter:string'
|