diff --git a/README.md b/README.md index b4b03c9..4573dfa 100644 --- a/README.md +++ b/README.md @@ -979,7 +979,7 @@ PUBLISHER CONFIRMS RabbitMQ supports lightweight method of confirming that broker received and processed a message. For this method to work, the channel needs to be put in so-called _confirm mode_. -This is done using setConfirmMode() method. When channel is successfully put in +This is done using confirmSelect() method. When channel is successfully put in confirm mode, the server and client count messages (starting from 1) and server sends acknowledgments for every message it processed (it can also acknowledge multiple message at once). @@ -1001,7 +1001,7 @@ channel.onNack([&](uint64 deliveryTag, bool multiple, bool requeue) { }); // put channel in confirm mode -channel.setConfirmMode().onSuccess([&]() { +channel.confirmSelect().onSuccess([&]() { channel.publish("my-exchange", "my-key", "my first message"); // message counter is now 1, will call onAck/onNack with deliverTag=1 diff --git a/include/amqpcpp/channel.h b/include/amqpcpp/channel.h index 29b3097..898bdf0 100644 --- a/include/amqpcpp/channel.h +++ b/include/amqpcpp/channel.h @@ -133,9 +133,9 @@ public: * This function returns a deferred handler. Callbacks can be installed * using onSuccess(), onError() and onFinalize() methods. */ - Deferred &setConfirmMode() + Deferred &confirmSelect() { - return _implementation->setConfirmMode(); + return _implementation->confirmSelect(); } /** diff --git a/include/amqpcpp/channelimpl.h b/include/amqpcpp/channelimpl.h index e9b680d..f1f4534 100644 --- a/include/amqpcpp/channelimpl.h +++ b/include/amqpcpp/channelimpl.h @@ -287,7 +287,7 @@ public: /** * Put channel in a confirm mode (RabbitMQ specific) */ - Deferred &setConfirmMode(); + Deferred &confirmSelect(); /** * Start a transaction diff --git a/src/channelimpl.cpp b/src/channelimpl.cpp index f52f330..ecdef51 100644 --- a/src/channelimpl.cpp +++ b/src/channelimpl.cpp @@ -187,7 +187,7 @@ Deferred &ChannelImpl::resume() * This function returns a deferred handler. Callbacks can be installed * using onSuccess(), onError() and onFinalize() methods. */ -Deferred &ChannelImpl::setConfirmMode() +Deferred &ChannelImpl::confirmSelect() { // send a transaction frame return push(ConfirmSelectFrame(_id));