amqp-get.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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-get</refentrytitle>
  17. <manvolnum>1</manvolnum>
  18. <refmiscinfo class="manual">RabbitMQ C Client</refmiscinfo>
  19. </refmeta>
  20. <refnamediv>
  21. <refname>amqp-get</refname>
  22. <refpurpose>Get a message from a queue on an AMQP server</refpurpose>
  23. </refnamediv>
  24. <refsynopsisdiv>
  25. <cmdsynopsis>
  26. <command>amqp-get</command>
  27. <arg choice="opt" rep="repeat">
  28. <replaceable>OPTION</replaceable>
  29. </arg>
  30. <arg choice="req">-q <replaceable>queue name</replaceable></arg>
  31. </cmdsynopsis>
  32. </refsynopsisdiv>
  33. <refsect1>
  34. <title>Description</title>
  35. <para>
  36. <command>amqp-get</command> attempts to consume a single
  37. message from a queue on an AMQP server, and exits. Unless
  38. the queue was empty, the body of the resulting message is
  39. sent to standard output.
  40. </para>
  41. </refsect1>
  42. <refsect1>
  43. <title>Options</title>
  44. <variablelist>
  45. <varlistentry>
  46. <term><option>-q</option></term>
  47. <term><option>--queue</option>=<replaceable class="parameter">queue name</replaceable></term>
  48. <listitem>
  49. <para>
  50. The name of the queue to consume messages
  51. from.
  52. </para>
  53. </listitem>
  54. </varlistentry>
  55. </variablelist>
  56. </refsect1>
  57. <refsect1>
  58. <title>Exit Status</title>
  59. <para>
  60. If the queue is not empty, and a message is successfully
  61. retrieved, the exit status is 0. If an error occurs, the
  62. exit status is 1. If the queue is found to be empty, the
  63. exit status is 2.
  64. </para>
  65. </refsect1>
  66. <refsect1>
  67. <title>Examples</title>
  68. <variablelist>
  69. <varlistentry>
  70. <term>Get a message from the queue <quote><systemitem
  71. class="resource">myqueue</systemitem></quote>, and
  72. display its body on standard output:</term>
  73. <listitem>
  74. <screen><prompt>$ </prompt><userinput>amqp-get -q myqueue</userinput></screen>
  75. </listitem>
  76. </varlistentry>
  77. </variablelist>
  78. </refsect1>
  79. <refsect1>
  80. <title>See also</title>
  81. <para>
  82. <citerefentry><refentrytitle>librabbitmq-tools</refentrytitle><manvolnum>7</manvolnum></citerefentry>
  83. describes connection-related options common to all the
  84. RabbitMQ C Client tools.
  85. </para>
  86. </refsect1>
  87. </refentry>