Configurable AbortController #444
DimTheo
started this conversation in
Feature Request
Replies: 1 comment 2 replies
-
Hey, thanks for the feature suggestion. Honestly, that sounds a little complex though and I'm not really sure if we have any use cases for our apps so not sure if it's something we could immediately prioritise, it's certainly one that we could think about or look at a PR for though. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Currently the
abort
option used inconsumer.stop()
aborts all requests. Making it configurable to only abort the selected commands (likeReceiveMessageCommand
) would allow to configure the consumer so that during graceful shutdown our code can abortReceiveMessageCommand
requests only, thus stopping receiving new messages while in the same time all currently processed queue messages can trigger the rest of the commands as normal.If passing the commands in the
stop
method is not achievable, the commands could be passed during the initialization of the consumer.Objectives
consumer.stop({ abort: true })
.stop
without theabort
flag doesn't abort any ongoing ReceiveMessageCommand requests, while using theabort: true
flag is error-prone for messages currently being processed.stop
method or initialization of consumer allows for fine-tuning.Beta Was this translation helpful? Give feedback.
All reactions