public static void main(String[] args) throws IOException { Environment.initialize(); Stream<Long> stream = Streams.period(1); stream.consume(n -> logger.debug("\t A[{}]", n)); // 2nd subscriber starts 5 seconds later to emphasize independent streams sleep(5); stream.consume(n -> logger.debug("\t\t\t B[{}]", n)); System.in.read(); }