rsmq
rsmq copied to clipboard
Allow custom IDs to be passed into sendMessage
Allow choosing an ID rather than letting the library choose one. Useful when you already want to reference an out-of-band object with an UUID.
What happens if you send a message with an ID that already exists in the queue?
If you send a message that already exists in the queue, it will update the minimum delay before the message is picked up to the current timestamp plus options.delay
, if you have that set. It will also overwrite the message, but not any of it's properties, like last received, receive count, and so on.
Rather than do any of that, should we just throw an error if the message exists and force you to delete the old message first, or should we just completely replace all the properties on the message?