Flume’s main use-case is to ingest data into Hadoop.
Kafka’s main use-case is a distributed publish-subscribe messaging system.
Use Flume if you have an non-relational data sources such as log files that you want to stream into Hadoop. Use Kafka if you need a highly reliable and scalable enterprise messaging system to connect many multiple systems, one of which is Hadoop.