Q: How multi-threaded Kafka producer work? How multi threaded Kafka Producer will work when there is a single source of streaming data? Let's say we have three producer threads. How each producer will know from where the data consumption will start? We don't want each producer to consume the same data (duplicate).

A: It seems to me not a Kafka problem but how you synchronize your clients (as receivers from the API) before using the producers for sending messages to Kafka.

A: 
How multi threaded Kafka Producer will work when u have single source
  of streaming data?

You might want to use some sort of intermediate state to track the primary keys of your events which are successfully stored in kafkastream.
Think of it as in Relational database, where database would throw DuplicateKeyException when you try to write multiple records with the same primary keys.
Same with kafka stream, choose some unique properties in your event to be primary keys, and store them in some sort of cache (Simply hashmap if all producers are in same machine/same app, but distributed cache like Redis, Memcached if you have producers distributed across different machines)
So, the flow would be if the event is already in EMITTED state in cache drop the event.
                               | emitted events |
Producer1---event1, event10 ---| e1  - EMITTED  |  
                               | e10 - EMITTED  |   eventstream
                               |                |--------------------
Producer2---event1, event2-----| e2 - EMITTED   |  e1, e10, e2, e3  
   (ignores e1)                |                |
                               |                |--------------------
Producer3---event1, event3-----| e3 - EMITTED   |
   (ignores e1)                |                |

You might also want to track two states of events, EMIT_INITIATED and EMITTED once kafkastream acknowledges persistence. This will solve a problem when producer 1 and producer 2 both try to emit event1 at the same time and since none of them see it in cache, both will be emitted to stream.
