public class RabbitMessageCloseable extends Object implements AutoCloseable
Acknowledgement
argument.Constructor and Description |
---|
RabbitMessageCloseable(RabbitConsumerState consumerState,
boolean multiple,
boolean reQueue)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
RabbitMessageCloseable |
withAcknowledge(Boolean acknowledge)
Deprecated.
as of 3.4.0
|
RabbitMessageCloseable |
withAcknowledgmentAction(AcknowledgmentAction acknowledgmentAction)
Builder style sets whether the message acknowledgment action should be addressed and message should be acknowledged or rejected,
or otherwise should acknowledgment action be skipped.
|
public RabbitMessageCloseable(RabbitConsumerState consumerState, boolean multiple, boolean reQueue)
consumerState
- The message statemultiple
- Whether multiple messages should be responded toreQueue
- Whether rejections should cause the messages to be re-queuedpublic void close() throws io.micronaut.messaging.exceptions.MessageAcknowledgementException
close
in interface AutoCloseable
io.micronaut.messaging.exceptions.MessageAcknowledgementException
@Deprecated public RabbitMessageCloseable withAcknowledge(@Nullable Boolean acknowledge)
acknowledge
- The acknowledge parameter.public RabbitMessageCloseable withAcknowledgmentAction(@NonNull AcknowledgmentAction acknowledgmentAction)
AcknowledgmentAction.ACK
if the message should be acknowledged.
Set to AcknowledgmentAction.NACK
if the message should be rejected.
Set to AcknowledgmentAction.NONE
if the message should not be acknowledged or rejected.acknowledgmentAction
- The acknowledgment action parameter.