// Create writer threads for populating different stores of the joiner
StoreBusPersonWriter personWriter = new StoreBusPersonWriter("Person", eventRetention, personStore, waterMarksClock);
StoreBusAddressWriter addressWriter = new StoreBusAddressWriter("Address", eventRetention, addressStore, waterMarksClock);
// Start writer threads with fixed delay
ScheduledExecutorService executor = Executors.newScheduledThreadPool(2, new DaemonThreadFactory());
executor.scheduleWithFixedDelay(personWriter, 0, 10, TimeUnit.MILLISECONDS);
executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
// Start Avro store joiner bus server
AvroStoreBus<Integer> storeBus = new AvroStoreBusImpl<Integer>("JoinedSources", eventRetention, joiner);