  The European Spallation Source (ESS) will provide long neutron pulses for
experiments on a suite of different instruments. Most of these will perform
neutron data acquisition in event mode, i.e. each detected neutron will be
characterised by one absolute timestamp and pixel identifier pair. Slow
controls metadata from EPICS, such as sample environment measurements and motor
positions, will also be timestamped at their source, so that all data and
metadata are streamed as a list of events instead of histograms. A flexible
data aggregation and streaming system is being developed combining both open
source third-party software and in-house development. This is to be used at ESS
and other neutron scattering facilities like ISIS and SINQ, replacing legacy
solutions by a shared software collection maintained by a cross-facility
effort. The architecture of the Apache Kafka-based system, its metadata
forwarding and NeXus file writing components are presented, along with test
results demonstrating their integration and the scalability in terms of
performance.
