Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
07997188
Commit
07997188
authored
5 months ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
fixed docs
parent
53e3c687
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#63931
passed with stages
in 2 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coolamqp/objects.py
+26
-21
26 additions, 21 deletions
coolamqp/objects.py
with
26 additions
and
21 deletions
coolamqp/objects.py
+
26
−
21
View file @
07997188
...
@@ -251,7 +251,7 @@ class ServerProperties(object):
...
@@ -251,7 +251,7 @@ class ServerProperties(object):
"""
"""
An object describing properties of the target server.
An object describing properties of the target server.
:ivar version: tuple of (major version, minor version)
:ivar version: tuple of (major version, minor version)
of the AMQP protocol in use. Practically always 0, 9.
:ivar properties: dictionary of properties (key str, value any)
:ivar properties: dictionary of properties (key str, value any)
:ivar mechanisms: a list of strings, supported auth mechanisms
:ivar mechanisms: a list of strings, supported auth mechanisms
:ivar locales: locale in use
:ivar locales: locale in use
...
@@ -278,27 +278,8 @@ class Queue(object):
...
@@ -278,27 +278,8 @@ class Queue(object):
"""
"""
This object represents a Queue that applications consume from or publish to.
This object represents a Queue that applications consume from or publish to.
Create a queue definition.
Create a queue definition.
:param name: name of the queue.
None (default) for autogeneration. Just follow the rules for :ref:`anonymq`.
If empty string, a UUID name will be generated, and you won
'
t have an anonymous queue anymore.
:param durable: Is the queue durable?
:param exchange: Exchange for this queue to bind to. None for no binding.
:param exclusive: This queue will be deleted when the connection closes
:param auto_delete: This queue will be deleted when the last consumer unsubscribes
:param arguments: either a list of (bytes, values) or a dict of (str, value) to pass as an extra argument
:param routing_key: routing key that will be used to bind to an exchange. Used only when this
queue is associated with an exchange. Default value of blank should suffice.
:param arguments: either a list of (bytes, values) or a dict of (str, value) to pass as an extra argument during
declaration
:param arguments_bind: arguments to pass to binding to a (headers, I suppose exchange)
:raises ValueError: tried to create a queue that was not durable or auto_delete
:raises ValueError: tried to create a queue that was not exclusive or auto_delete and not anonymous
:raises ValueError: tried to create a queue that was anonymous and not auto_delete or durable
:warns DeprecationWarning: if a non-exclusive auto_delete queue is created or some other combinations
that will be soon unavailable (eg. RabbitMQ 4.0).
:warns UserWarning: if you
'
re declaring an auto_delete or exclusive, anonymous queue
"""
"""
__slots__
=
(
'
name
'
,
'
durable
'
,
'
exchange
'
,
'
auto_delete
'
,
'
exclusive
'
,
__slots__
=
(
'
name
'
,
'
durable
'
,
'
exchange
'
,
'
auto_delete
'
,
'
exclusive
'
,
'
anonymous
'
,
'
consumer_tag
'
,
'
arguments
'
,
'
routing_key
'
,
'
arguments_bind
'
)
'
anonymous
'
,
'
consumer_tag
'
,
'
arguments
'
,
'
routing_key
'
,
'
arguments_bind
'
)
...
@@ -311,6 +292,30 @@ class Queue(object):
...
@@ -311,6 +292,30 @@ class Queue(object):
routing_key
=
b
''
,
#: type: tp.Union[str, bytes]
routing_key
=
b
''
,
#: type: tp.Union[str, bytes]
arguments_bind
=
None
,
arguments_bind
=
None
,
):
):
"""
:param name: name of the queue.
None (default) for autogeneration. Just follow the rules for :ref:`anonymq`.
If empty string, a UUID name will be generated, and you won
'
t have an anonymous queue anymore. This queue
will be considered named by all of the other code.
:param durable: Is the queue durable?
:param exchange: Exchange for this queue to bind to. None for no binding.
:param exclusive: This queue will be deleted when the connection closes
:param auto_delete: This queue will be deleted when the last consumer unsubscribes
:param arguments: either a list of (bytes, values) or a dict of (str, value) to pass as an extra argument
:param routing_key: routing key that will be used to bind to an exchange. Used only when this
queue is associated with an exchange. Default value of blank should suffice.
:param arguments: either a list of (bytes, values) or a dict of (str, value) to pass as an extra argument during
declaration
:param arguments_bind: arguments to pass to binding to a (headers, I suppose exchange)
:raises ValueError: tried to create a queue that was not durable or auto_delete
:raises ValueError: tried to create a queue that was not exclusive or auto_delete and not anonymous
:raises ValueError: tried to create a queue that was anonymous and not auto_delete or durable
.. warning::
If a non-exclusive auto_delete queue is created or some other combinations that will be soon unavailable
(eg. RabbitMQ 4.0), a DeprecationWarning will be raised.
If you
'
re declaring an auto_delete non-exclusive a UserWarning will be raised instead.
"""
if
name
is
None
:
if
name
is
None
:
self
.
name
=
None
self
.
name
=
None
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment