amqp-declare-queue.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"
  3. [
  4. <!ENTITY date SYSTEM "man-date.ent" >
  5. ]
  6. >
  7. <refentry lang="en">
  8. <refentryinfo>
  9. <productname>RabbitMQ C Client</productname>
  10. <authorgroup>
  11. <corpauthor>The RabbitMQ Team &lt;<ulink url="mailto:info@rabbitmq.com"><email>info@rabbitmq.com</email></ulink>&gt;</corpauthor>
  12. </authorgroup>
  13. <date>&date;</date>
  14. </refentryinfo>
  15. <refmeta>
  16. <refentrytitle>amqp-declare-queue</refentrytitle>
  17. <manvolnum>1</manvolnum>
  18. <refmiscinfo class="manual">RabbitMQ C Client</refmiscinfo>
  19. </refmeta>
  20. <refnamediv>
  21. <refname>amqp-declare-queue</refname>
  22. <refpurpose>Declare (create or assert the existence of) a queue on an AMQP server</refpurpose>
  23. </refnamediv>
  24. <refsynopsisdiv>
  25. <cmdsynopsis>
  26. <command>amqp-declare-queue</command>
  27. <arg choice="opt" rep="repeat">
  28. <replaceable>OPTION</replaceable>
  29. </arg>
  30. <arg choice="opt">-d</arg>
  31. <arg choice="req">-q <replaceable>queue name</replaceable></arg>
  32. </cmdsynopsis>
  33. </refsynopsisdiv>
  34. <refsect1>
  35. <title>Description</title>
  36. <para>
  37. <command>amqp-declare-queue</command> attempts to create a
  38. queue on an AMQP server, and exits. If the empty-string is
  39. supplied as the queue name, a fresh queue name is
  40. generated by the server and returned. In all cases, if a
  41. queue was successfully declared, the (raw binary) name of
  42. the queue is printed to standard output, followed by a
  43. newline.
  44. </para>
  45. </refsect1>
  46. <refsect1>
  47. <title>Options</title>
  48. <variablelist>
  49. <varlistentry>
  50. <term><option>-q</option></term>
  51. <term><option>--queue</option>=<replaceable class="parameter">queue name</replaceable></term>
  52. <listitem>
  53. <para>
  54. The name of the queue to declare. If the
  55. empty string is supplied, a fresh queue name
  56. is generated by the server.
  57. </para>
  58. </listitem>
  59. </varlistentry>
  60. <varlistentry>
  61. <term><option>-d</option></term>
  62. <term><option>--durable</option></term>
  63. <listitem>
  64. <para>
  65. Causes the queue to be declared with the
  66. "durable" flag set. Durable queues survive
  67. server restarts. By default, queues are declared
  68. in "transient" mode.
  69. </para>
  70. </listitem>
  71. </varlistentry>
  72. </variablelist>
  73. </refsect1>
  74. <refsect1>
  75. <title>Exit Status</title>
  76. <para>
  77. If the queue was successfully declared, the exit status is
  78. 0. If an error occurs, the exit status is 1.
  79. </para>
  80. </refsect1>
  81. <refsect1>
  82. <title>Examples</title>
  83. <variablelist>
  84. <varlistentry>
  85. <term>Declare the durable queue <quote><systemitem
  86. class="resource">myqueue</systemitem></quote>, and
  87. display the name of the queue on standard output:</term>
  88. <listitem>
  89. <screen><prompt>$ </prompt><userinput>amqp-declare-queue -d -q myqueue</userinput>
  90. myqueue</screen>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry>
  94. <term>Declare a fresh, server-named transient queue,
  95. and display the name of the queue on standard output
  96. (use <citerefentry><refentrytitle>amqp-delete-queue</refentrytitle>
  97. <manvolnum>1</manvolnum></citerefentry> to delete
  98. it from the server once you're done):</term>
  99. <listitem>
  100. <screen><prompt>$ </prompt><userinput>amqp-declare-queue -q ""</userinput>
  101. amq.gen-BW/wvociA8g6LFpb1PlqOA==</screen>
  102. </listitem>
  103. </varlistentry>
  104. </variablelist>
  105. </refsect1>
  106. <refsect1>
  107. <title>See also</title>
  108. <para>
  109. <citerefentry><refentrytitle>librabbitmq-tools</refentrytitle><manvolnum>7</manvolnum></citerefentry>
  110. describes connection-related options common to all the
  111. RabbitMQ C Client tools.
  112. </para>
  113. </refsect1>
  114. </refentry>