diff options
Diffstat (limited to 'kombu/entity.py')
-rw-r--r-- | kombu/entity.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/kombu/entity.py b/kombu/entity.py index 2329e748..5e6419ae 100644 --- a/kombu/entity.py +++ b/kombu/entity.py @@ -42,6 +42,7 @@ class Exchange(MaybeChannelBound): """An Exchange declaration. Arguments: + --------- name (str): See :attr:`name`. type (str): See :attr:`type`. channel (kombu.Connection, ChannelT): See :attr:`channel`. @@ -51,7 +52,8 @@ class Exchange(MaybeChannelBound): arguments (Dict): See :attr:`arguments`. no_declare (bool): See :attr:`no_declare` - Attributes: + Attributes + ---------- name (str): Name of the exchange. Default is no name (the default exchange). @@ -190,6 +192,7 @@ class Exchange(MaybeChannelBound): """Bind the exchange to another exchange. Arguments: + --------- nowait (bool): If set the server will not respond, and the call will not block waiting for a response. Default is :const:`False`. @@ -221,6 +224,7 @@ class Exchange(MaybeChannelBound): """Create message instance to be sent with :meth:`publish`. Arguments: + --------- body (Any): Message body. delivery_mode (bool): Set custom delivery mode. @@ -259,6 +263,7 @@ class Exchange(MaybeChannelBound): """Publish message. Arguments: + --------- message (Union[kombu.Message, str, bytes]): Message to publish. routing_key (str): Message routing key. @@ -280,6 +285,7 @@ class Exchange(MaybeChannelBound): """Delete the exchange declaration on server. Arguments: + --------- if_unused (bool): Delete only if the exchange has no bindings. Default is :const:`False`. nowait (bool): If set the server will not respond, and a @@ -322,6 +328,7 @@ class binding(Object): """Represents a queue or exchange binding. Arguments: + --------- exchange (Exchange): Exchange to bind to. routing_key (str): Routing key used as binding key. arguments (Dict): Arguments for bind operation. @@ -376,6 +383,7 @@ class Queue(MaybeChannelBound): """A Queue declaration. Arguments: + --------- name (str): See :attr:`name`. exchange (Exchange, str): See :attr:`exchange`. routing_key (str): See :attr:`routing_key`. @@ -394,7 +402,8 @@ class Queue(MaybeChannelBound): max_length_bytes (int): See :attr:`max_length_bytes`. max_priority (int): See :attr:`max_priority`. - Attributes: + Attributes + ---------- name (str): Name of the queue. Default is no name (default queue destination). @@ -628,6 +637,7 @@ class Queue(MaybeChannelBound): """Declare queue on the server. Arguments: + --------- nowait (bool): Do not wait for a reply. passive (bool): If set, the server will not create the queue. The client can use this to check whether a queue exists @@ -684,11 +694,13 @@ class Queue(MaybeChannelBound): specific types of applications where synchronous functionality is more important than performance. - Returns: + Returns + ------- ~kombu.Message: if a message was available, or :const:`None` otherwise. Arguments: + --------- no_ack (bool): If enabled the broker will automatically ack messages. accept (Set[str]): Custom list of accepted content types. @@ -717,6 +729,7 @@ class Queue(MaybeChannelBound): until the client cancels them. Arguments: + --------- consumer_tag (str): Unique identifier for the consumer. The consumer tag is local to a connection, so two clients can use the same consumer tags. If this field is empty @@ -747,6 +760,7 @@ class Queue(MaybeChannelBound): """Delete the queue. Arguments: + --------- if_unused (bool): If set, the server will only delete the queue if it has no consumers. A channel error will be raised if the queue has consumers. |