akka / akka-edge-rs

Akka Edge support in Rust
https://doc.akka.io/docs/akka-edge/current/
Other
9 stars 1 forks source link

Introduces dynamic filtering #35

Closed huntc closed 1 year ago

huntc commented 1 year ago

Filtering can be specified dynamically through the use of a Tokio watch channel. Watch is known as "spmc" (Single Producer, Multi Consumer), and has the special property that it remembers the last value sent. If multiple producers were required then the watch could easily be composed within an mpsc (Multi Producer, Single Consumer).

The test illustrates how both an initial filter can be set up, and how it can then be subsequently replaced. The tests have also been enhanced to assert that both the initial request and a filter update are conveyed to the remote producer.