The new kafkaStream function in the StreamingContext (with the kafkaParams map) should also be added in the JavaStreamingContext. Can you do that? And it should take java map and not scala map, and inside the function that conversion from java to scala map should be made.