Package io.atleon.aws.sqs
Class SqsReceiverMessage
- java.lang.Object
-
- io.atleon.aws.sqs.AbstractSqsMessage<String>
-
- io.atleon.aws.sqs.SqsReceiverMessage
-
- All Implemented Interfaces:
ReceivedSqsMessage<String>,SqsMessage<String>
public final class SqsReceiverMessage extends AbstractSqsMessage<String> implements ReceivedSqsMessage<String>
AnSqsMessagethat has been received and must have its deletion and visibility explicitly handled.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeVisibility(Duration timeout)Schedules a change of this Message's visibility by the provided Duration (which should have a whole number of seconds) and marks the message as no longer in process.voidchangeVisibility(Duration timeout, boolean stillInProcess)Schedules a change of this Message's visibility by the provided Duration (which should have a whole number of seconds) and may mark the message as still in process.voiddelete()Schedules this Message for deletionRunnabledeleter()Returns theRunnableused to schedule this Message for deletion.Optional<String>messageDeduplicationId()Optional<String>messageGroupId()StringmessageId()Unique identifier for this Message.StringreceiptHandle()The Receipt Handle of this message, used to manage its visibility and deletion.SqsMessageVisibilityChangervisibilityChanger()Returns theSqsMessageVisibilityChangerused to explicitly manage this Message's visibility.-
Methods inherited from class io.atleon.aws.sqs.AbstractSqsMessage
body, messageAttributes, messageSystemAttribute, messageSystemAttribute, messageSystemAttributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.atleon.aws.sqs.SqsMessage
body, messageAttributes, messageSystemAttributes, senderDelaySeconds
-
-
-
-
Method Detail
-
receiptHandle
public String receiptHandle()
Description copied from interface:ReceivedSqsMessageThe Receipt Handle of this message, used to manage its visibility and deletion. Note that this value is unique to the act of receiving a Message with any given ID, and a unique Message with any given ID will receive a unique Receipt Handle each time it is received.- Specified by:
receiptHandlein interfaceReceivedSqsMessage<String>
-
messageId
public String messageId()
Description copied from interface:ReceivedSqsMessageUnique identifier for this Message.- Specified by:
messageIdin interfaceReceivedSqsMessage<String>
-
messageDeduplicationId
public Optional<String> messageDeduplicationId()
- Specified by:
messageDeduplicationIdin interfaceSqsMessage<String>
-
messageGroupId
public Optional<String> messageGroupId()
- Specified by:
messageGroupIdin interfaceSqsMessage<String>
-
delete
public void delete()
Schedules this Message for deletion
-
changeVisibility
public void changeVisibility(Duration timeout)
Schedules a change of this Message's visibility by the provided Duration (which should have a whole number of seconds) and marks the message as no longer in process.
-
changeVisibility
public void changeVisibility(Duration timeout, boolean stillInProcess)
Schedules a change of this Message's visibility by the provided Duration (which should have a whole number of seconds) and may mark the message as still in process.
-
visibilityChanger
public SqsMessageVisibilityChanger visibilityChanger()
Returns theSqsMessageVisibilityChangerused to explicitly manage this Message's visibility.
-
-