ted-ross commented on a change in pull request #532: DISPATCH-1381: Create procedure for handling undeliverable messages URL: https://github.com/apache/qpid-dispatch/pull/532#discussion_r303592407
########## File path: docs/books/user-guide/routing.adoc ########## @@ -551,6 +551,87 @@ 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 _fallback destinations_. +A fallback destination is a queue on a broker that 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. +When a consumer reconnects and becomes reachable again, +it receives the messages stored at the fallback destination. + +[NOTE] +==== +{RouterName} does not preserve delivery order for messages stored at a fallback destination. When a consumer reconnects, it will receive the stored messages interleaved with any new messages sent by producers. +==== + +.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. +However, the original delivery order of the queued messages is not preserved; 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 automatically sent to consumers when they attach to the router. Review comment: I would delete "automatically" as it's not adding any valuable meaning. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org