Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom IDs to be passed into sendMessage #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charles-toller
Copy link

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

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
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.

None yet

2 participants