You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2019/07/16 17:37:41 UTC

[qpid-dispatch] branch master updated: DISPATCH-1381 - Create procedure for handling undeliverable messages. This closes #532.

This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new bf3a1aa  DISPATCH-1381 - Create procedure for handling undeliverable messages. This closes #532.
bf3a1aa is described below

commit bf3a1aa7d698900797ad002f2997936afe318b56
Author: Ben Hardesty <bh...@redhat.com>
AuthorDate: Wed Jul 3 12:21:30 2019 -0400

    DISPATCH-1381 - Create procedure for handling undeliverable messages. This closes #532.
---
 docs/books/user-guide/routing.adoc | 82 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/docs/books/user-guide/routing.adoc b/docs/books/user-guide/routing.adoc
index b3e926e..2960524 100644
--- a/docs/books/user-guide/routing.adoc
+++ b/docs/books/user-guide/routing.adoc
@@ -551,6 +551,88 @@ autoLink {
 For information about additional attributes, see link:{qdrouterdConfManPageUrl}#_autolink[autoLink] in the `qdrouterd.conf` man page.
 --
 
+=== Handling Undeliverable Messages for an Address
+
+You handle undeliverable messages for an address by configuring autolinks that point to _fallback destinations_.
+A fallback destination (such as a queue on a broker) stores messages that are not directly routable to any consumers.
+
+During normal message delivery,
+{RouterName} delivers messages to the consumers that are attached to the router network.
+However, if no consumers are reachable,
+the messages are diverted to any fallback destinations that were configured for the address (if the autolinks that point to the fallback destinations are active).
+When a consumer reconnects and becomes reachable again,
+it receives the messages stored at the fallback destination.
+
+[NOTE]
+====
+{RouterName} preserves the original delivery order for messages stored at a fallback destination. However, when a consumer reconnects, any new messages produced while the queue is draining will be interleaved with the messages stored at the fallback destination.
+====
+
+.Prerequisites
+
+* The router is connected to a broker.
++
+For more information, see xref:connecting-to-external-amqp-containers-router[].
+
+.Procedure
+
+This procedure enables fallback for an address
+and configures autolinks to connect to the broker queue
+that provides the fallback destination for the address.
+
+. Enable fallback destinations for the address.
++
+[options="nowrap",subs="+quotes"]
+----
+address {
+    prefix: my-address
+    enableFallback: yes
+}
+----
+
+. Add an _outgoing_ autolink to a queue on the broker.
++
+--
+For the address for which you enabled fallback,
+if messages are not routable to any consumers,
+the router will use this autolink to send the messages to a queue on the broker.
+
+[options="nowrap",subs="+quotes"]
+----
+autoLink {
+    address: my-address.2
+    direction: out
+    connection: my-broker
+    fallback: yes
+}
+----
+--
+
+. If you want the router to send queued messages to attached consumers as soon as they connect to the router network,
+add an _incoming_ autolink.
++
+--
+As soon as a consumer attaches to the router,
+it will receive the messages stored in the broker queue,
+along with any new messages sent by the producer.
+The original delivery order of the queued messages is preserved;
+however, the queued messages will be interleaved with the new messages.
+
+If you do not add the incoming autolink,
+the messages will be stored on the broker,
+but will not be sent to consumers when they attach to the router.
+
+[options="nowrap",subs="+quotes"]
+----
+autoLink {
+    address: my-address.2
+    direction: in
+    connection: my-broker
+    fallback: yes
+}
+----
+--
+
 === Example: Routing Messages Through Broker Queues
 
 This example shows how waypoints and autolinks can route messages through a pair of queues on a broker.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org