Update README.md
This commit is contained in:
parent
78a6064b61
commit
42549a7812
39
README.md
39
README.md
|
|
@ -343,17 +343,16 @@ can all be used for it. The most simple one takes three arguments: the name of t
|
||||||
exchange to publish to, the routing key to use, and the actual message that
|
exchange to publish to, the routing key to use, and the actual message that
|
||||||
you're publishing - all these parameters are standard C++ strings.
|
you're publishing - all these parameters are standard C++ strings.
|
||||||
|
|
||||||
More extended versions of the publish() method exist too, and take additional
|
More extended versions of the publish() method exist that accept additional
|
||||||
flags, arguments, and enable you to publish an entire Envelope object -
|
arguments, and that enable you to publish entire Envelope objects, which are
|
||||||
which is an object that contains the message to publish plus a list of
|
objects that contain the message plus a list of optional meta information like
|
||||||
optional meta information like the content-type, content-encoding, priority,
|
the content-type, content-encoding, priority, expire time and more. None of these
|
||||||
expire time and more. None of these meta fields are interpreted by this library,
|
meta fields are interpreted by this library, and also the RabbitMQ ignores most
|
||||||
and also the RabbitMQ ignores most of them, but the AMQP protocol defines them,
|
of them, but the AMQP protocol defines them, and they are free for you to use.
|
||||||
and they are free for you to use. For an extensive list of the fields that are
|
For an extensive list of the fields that are supported, take a look at the MetaData.h
|
||||||
supported, take a look at the Envelope.h header file. You should also check
|
header file. You should also check the RabbitMQ documentation to find out if a
|
||||||
the RabbitMQ documentation to find out if a envelope header is interpreted by
|
envelope header is interpreted by the RabbitMQ server (at the time of this writing,
|
||||||
the RabbitMQ server (at the time of this writing, only the expire time is being
|
only the expire time is being used).
|
||||||
used).
|
|
||||||
|
|
||||||
The following snippet is copied from the Channel.h header file and lists all
|
The following snippet is copied from the Channel.h header file and lists all
|
||||||
available publish() methods. As you can see, you can call the publish() method
|
available publish() methods. As you can see, you can call the publish() method
|
||||||
|
|
@ -389,22 +388,24 @@ bool publish(const std::string &exchange, const std::string &routingKey, const c
|
||||||
|
|
||||||
Published messages are normally not confirmed by the server, hence there is no
|
Published messages are normally not confirmed by the server, hence there is no
|
||||||
ChannelHandler::onPublished() method that you can implement to find out if
|
ChannelHandler::onPublished() method that you can implement to find out if
|
||||||
a message was correctly received by the server. That's the design of the AMQP
|
a message was correctly received by the server. That's on purpose the design of
|
||||||
protocol, to not unnecessarily slow down message publishing. As long as no error is
|
the AMQP protocol, to not unnecessarily slow down message publishing. As long
|
||||||
reported via the ChannelHandler::onError() method, you can safely assume
|
as no error is reported via the ChannelHandler::onError() method, you can safely
|
||||||
that your messages were delivered.
|
assume that your messages were delivered.
|
||||||
|
|
||||||
If you use the flags parameter to set either the option 'mandatory' or
|
If you use the flags parameter to set either the option 'mandatory' or
|
||||||
'immediate' however, a message that could not be routed or directly delivered
|
'immediate', a message that could not be routed or directly delivered to a consumer
|
||||||
to a consumer is sent back to the client, and ends up in the ChannelHandler::onReturned()
|
is sent back to the client, and ends up in the ChannelHandler::onReturned()
|
||||||
method. At the time of this writing, the 'immediate' option does not seem to
|
method. At the time of this writing however, the 'immediate' option does not
|
||||||
be supported by RabbitMQ by the way.
|
seem to be supported by RabbitMQ.
|
||||||
|
|
||||||
|
|
||||||
CONSUMING MESSAGES
|
CONSUMING MESSAGES
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WORK IN PROGRESS
|
WORK IN PROGRESS
|
||||||
================
|
================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue