anchor.diff:  
   == Kafka Consumer subscriptions
   
  -Dealing with asynchronous code is usually complicated, Kafka consumers don't help.
  +Dealing with asynchronous code in tests is often painful, Kafka consumers don't help.
   
   It can take a long time for the consumer group controller to be elected, the partitions to be assigned. 
   Between the consumer bootstrap and the first messages being received,
  
positive.code: 
  == Kafka embedded in the test
  
  As both Kafka and Zookeeper are Java applications, it is possible to control them by calling their code. It is https://github.com/danielwegener/logback-kafka-appender/blob/master/src/test/java/com/github/danielwegener/logback/kafka/util/EmbeddedKafkaCluster.java[possible], but is not easy.
  
  There are many libraries make running an embedded Kafka from JUnit easy:
  
  * https://github.com/charithe/kafka-junit[Kafka JUnit] by Charith Ellawala
  * Another https://mguenther.github.io/kafka-junit/[Kafka JUnit] by Markus Günther
  
negative.code: as a result it contains a JUnit Rule to handle embedded Kafka lifecycle.
  [source,java]
  ----
  include::{sourcedir}/src/test/java/com/github/gquintana/kafka/SpringMessageServiceIT.java[tags=start]
  ----
  <1> JUnit 4 Rule that will start an embedded Kafka and create a topic.
  <2> The `kafka` rule is used to get embedded Kafka address.
  