Flume components should be stopped in the right way:
- stop the sources (in order to not receiving further notifications),
- wait until all events within the channels are consumed by the sinks,
- stop the channels and the sinks.
Currently, the shutdown hook stops the components in a random manner.
E.g.: SINK, CHANNEL, SOURCE.
Components are stored in the HashMap:
The problems which we can have:
- not all Events will be consumed (Sink will be stopped first)
- Source will continue to accept messages even though other components are stopped