ess-dmsc / kafka-to-nexus

(Mirror: moved to https://gitlab.esss.lu.se/ecdc/ess-dmsc/kafka-to-nexus) Writes NeXus files from experiment data streamed through Apache Kafka.
BSD 2-Clause "Simplified" License
2 stars 4 forks source link

Check write queue size with a lambda #718

Closed danesss closed 12 months ago

danesss commented 12 months ago

Issue

ECDC-3253

StreamController calls a function in Topics -> Partitions to set the boolean "Partition.IsPaused". This introduced synchronisation issues between the IsPaused boolean in StreamController and the IsPaused boolean inside every Partition instance, mainly due to the fact that the list of Partitions can dynamically change AFTER StreamController.IsPaused has been set.

Description of work

This change uses a different approach, where Partitions receive a lambda function with access to StreamController's IsPaused variable.

Checklist