diff --git a/src/reference/antora/modules/ROOT/pages/polling-consumer.adoc b/src/reference/antora/modules/ROOT/pages/polling-consumer.adoc index c3ea08948c8..884feaff178 100644 --- a/src/reference/antora/modules/ROOT/pages/polling-consumer.adoc +++ b/src/reference/antora/modules/ROOT/pages/polling-consumer.adoc @@ -68,15 +68,27 @@ When used with pollable message sources, the value of the header is an instance [source, java] ---- @FunctionalInterface -public interface AcknowledgmentCallback { +public interface AcknowledgmentCallback extends SimpleAcknowledgment { void acknowledge(Status status); - boolean isAcknowledged(); + @Override + default void acknowledge() { + acknowledge(Status.ACCEPT); + } + + default boolean isAcknowledged() { + return false; + } - void noAutoAck(); - default boolean isAutoAck(); + default void noAutoAck() { + throw new UnsupportedOperationException("You cannot disable auto acknowledgment with this implementation"); + } + + default boolean isAutoAck() { + return true; + } enum Status {