vertx / io.vertx.rabbitmq / RabbitMQClient / waitForConfirms

# waitForConfirms

`abstract fun waitForConfirms(resultHandler: Handler<AsyncResult<Void>>): Unit`

Wait until all messages published since the last call have been either ack'd or nack'd by the broker. This will incur slight performance loss at the expense of higher write consistency. If desired, multiple calls to basicPublish() can be batched before confirming.

### Exceptions

`java.io.IOException` - Throws an IOException if the message was not written to the queue.

See Also
Channel#waitForConfirms()http

`abstract fun waitForConfirms(timeout: Long, resultHandler: Handler<AsyncResult<Void>>): Unit`

Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.

### Parameters

`timeout` -

### Exceptions

`java.io.IOException` - Throws an IOException if the message was not written to the queue.

See Also
io.vertx.rabbitmq.impl.RabbitMQClientImpl#waitForConfirms(Handler)http