title: Unable to read kakfa messages through spark streaming
body: <p>We are writing the spark streaming application, to read kafka messages using createStream method and batch interval is 180 seconds.</p>
  
  <p>The code successfully working and creating files for every 180 seconds into s3 buckets , but no messages in the files. Below is the Environment</p>
  
  <p>Spark 2.3.0
  Kakfa 1.0 </p>
  
  <p>Please go through code and please let me know anything wrong here</p>
  
  <hr>
  
  <pre><code>#import dependencies
  import findspark
  
  findspark.init()
  
  from pyspark import SparkContext
  
  from pyspark.streaming import StreamingContext
  
  from pyspark.streaming.kafka import KafkaUtils
  
  import json
  
  from pyspark.sql import *
  </code></pre>
  
  <h1>Creating Context variables</h1>
  
  <pre><code>sc = SparkContext(appName="SparkStreamingwithPython").getOrCreate()
  
  sc.setLogLevel("WARN")
  
  ssc = StreamingContext(sc,180)
  
  topic="thirdtopic"
  
  ZkQuorum = "localhost:2181"
  </code></pre>
  
  <h1>Connect to Kafka And create Stream</h1>
  
  <pre><code>kakfaStream = KafkaUtils.createStream(ssc,ZkQuorum,"Spark-Streaming-Consumer",{topic:1})
  
  def WritetoS3(rdd):
       rdd.saveAsTextFile("s3://BucketName/thirdtopic/SparkOut")
  
  kakfaStream.foreachRDD(WritetoS3)
  ssc.start()
  
  ssc.awaitTermination()
  </code></pre>
  
  <hr>
  
  <p>Thanks in Advance.</p>