-
Notifications
You must be signed in to change notification settings - Fork 15
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
Emit a whole batch of messages #127
Comments
I think you need to use sqs FIFO queues and restrict the concurrent number of messages handled by this library to 1 using the |
@regevbr, thanks for your suggestions, but I already considered using FIFO queues and unfortunately came to the conclusion that it is not an option here. As concurrency should be restricted only if a batch of messages includes 2 or more messages that trigger the request and have the same parameter inside message. Otherwise even if messages trigger the request but do not have the same parameter they can be processed concurrently. I don't want any message to be handled one by one, only specific ones. I don't need to wait for X messages, |
Seems like you are trying to enforce something that does not fit sqs at all. I would suggest to use a separate queue for those unique messages and use concurrency of 1 message. If the queue is working in full throttle, you will always be notified of a single element array, as it does not operate like you think it does. I don't see a valid case yet to add that event as it might cause confusion. If you can implement it, run it, verify is solves your case, and present in a more clear and concise way your use case I will be more than happy to merge your change. Currently I don't fully understand your use case and how it will be solved in multi consumer, fully throttled situation. I think Kafka will br a much better fit for you and will get you going out of the box iregardless of number of consumers and throttling |
Is your feature request related to a problem? Please describe.
I have an integration with 3d-party API that has restrictions on having more than one concurrent request from the same customer. I use SQS to trigger API call, so sometimes it happens that the requests are processed and the same time. Thus, I really need to somehow filter messages from SQS based on the content of a message so some of the messages from the batch that have a specific combination of parameters will be released/deleted/etc, therefore not processed on my end at the same time. Overall this is maybe not the straight-forward issue, but I'm really frustrated with this API restrictions I cannot manage.
Describe the solution you'd like
In my opinion the simplest way to solve the problem I'm facing is to have a new event that emits an array of messages. Then I will be able to process every message on my end.
Additional context
Version used: 4.4.1
Node version: 16.5.0
The text was updated successfully, but these errors were encountered: