How to drain the queue of messages without stop the actor? #295
Unanswered
jBernavaPrah
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I forget which exact release introduced it but there is a Try updating the crate to a more recent release? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! First of all, thank you for this crate! :)
I'm trying to drain all the messages from the actor queue, without stopping it. What is the correct way to do it?
To provide more context:
I have an actor connected to a web socket. I send this actor a message to perform some long-running tasks, and the results are sent back via a different channel.
I may have sent many messages to this actor that are still in the queue. Due to some external circumstances, I would like to remove all the remaining messages in the queue without stopping the actor to avoid having to reconnect to the service.
Do you have any suggestions in place?
Happy to provide more context if necessary!
Thanks a lot!
J
Beta Was this translation helpful? Give feedback.
All reactions