Amazon SQS getMessageID -
amazon sqs delivers @ least 1 delivery. have proof whether message send second time. possible identify delete of unique message getmessageid() method? can store string in data structure , match it?
when receive sqs message, there 2 relevant items sent along message:
messageid
a unique identifier message. message ids considered unique across aws accounts extended period of time.
type: string
required: no
receipthandle
an identifier associated act of receiving message. new receipt handle returned every time receive message. when deleting message, provide last received receipt handle delete message.
type: string
required: no
so identify duplicate messages, need to:
- store messageids have received
- check if new message's messageid exists in messageid store
you store receipthandles, if care receiving them once think storing messageids sufficient imply had been received once.
once identify duplicate, can use duplicate message's receipthandle delete duplicate message, if wish.
Comments
Post a Comment