From 7c7152d0c21dd0db06b02f70a8a90cc23e912e34 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Wed, 26 Jan 2022 16:57:01 +0100 Subject: [PATCH] update readme.md with onLost/onError handling example because it didnt compile (order was wrong) (fixes #442) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c977de0..8e9cc63 100644 --- a/README.md +++ b/README.md @@ -1133,17 +1133,17 @@ reliable.publish("my-exchange", "my-key", "my first message").onAck([]() { // the message has _explicitly_ been nack'ed by RabbitMQ (in your application // code you probably want to log or handle this to avoid data-loss) -}).onError([](const char *message) { - - // a channel-error occurred before any ack or nack was received, and the - // message is probably lost too (which you want to handle) - }).onLost([]() { // because the implementation for onNack() and onError() will be the same // in many applications, you can also choose to install a onLost() handler, // which is called when the message has either been nack'ed, or lost. +}).onError([](const char *message) { + + // a channel-error occurred before any ack or nack was received, and the + // message is probably lost (which you might want to handle) + }); ````