이 콘텐츠는 선택한 언어로 제공되지 않습니다.
9.7. Create Command
The QMF
create
command takes five arguments:
- type
- The type of object to be created, this can be a queue, exchange or binding.
- name
- The name of the object to be created. The
name
argument of a queue or exchange is a single value, for example a queue namedmy-queue
sets the name argument to a string of that value. The name of a binding uses the pattern exchange/queue/key, for example:amq.topic/my-queue/my-key
identifies a binding betweenmy-queue
and the exchangeamq.topic
with the binding keymy-key
. - properties
- The specific properties for the object to be created, value is a nested map.
- strict
- The strict argument takes a boolean value that is presently ignored. This value is intended to indicate whether the command will fail if any unrecognized properties have been specified.
- auto_delete_timeout
- Optional. If specified upon first declaring an auto-delete queue, specifies a delay, in seconds, after which the deletion will take place. Note: If the queue is re-declared after becoming eligible for deletion, but before the delay expires, then the queue will be not be deleted.
The following code example uses QMF to create a queue named
my-queue
. In this example my-queue
is configured to be auto-deleted after 10 seconds.
- Python
Copy to Clipboard Copied! Toggle word wrap Toggle overflow