Is it possible to deduplicate messages sent to the agent's queue? #109
Replies: 2 comments 2 replies
-
|
Hi. The easiest and probably best way that comes to mind would be to use a mailbox/queue that implements this functionality. From there the current implementation allows to create a dedicated dispatcher by specifying the custom |
Beta Was this translation helpful? Give feedback.
-
|
@mdbergmann please, take a look at this PR: #111 It adds support for mbox-type for pinned dispatchers and also makes it possible to use a custom function to create a dispatcher instance. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, I have an agent which renders the static site.
When some event has happened, it's handler sends agent a message to rerender the site. However when there are already a :rerender message in the queue I don't want to add another one - otherwise when there are many events, rerender will happen to often.
So I need an actor which will discard some messages sent to it with a code like this:
It whould be wonderful, if there will be some way to preprocess message to decide if the message should be discarded, because my message is the list where first item is a keyword (action name) and the rest are arguments such as site id, config, etc and I want to consider only action name and site id for deduplcation.
Beta Was this translation helpful? Give feedback.
All reactions