Skip to content

Allow custom IDs to be passed into sendMessage#130

Open
charles-toller wants to merge 1 commit into
smrchy:masterfrom
charles-toller:master
Open

Allow custom IDs to be passed into sendMessage#130
charles-toller wants to merge 1 commit into
smrchy:masterfrom
charles-toller:master

Conversation

@charles-toller
Copy link
Copy Markdown

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.

@rogerweb
Copy link
Copy Markdown

rogerweb commented Jan 5, 2021

What happens if you send a message with an ID that already exists in the queue?

@charles-toller
Copy link
Copy Markdown
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants