Debian Codegraph @

tools/doc/amqp-get.xml

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