public class SampleProducer extends Object
BOOTSTRAP_SERVERS and TOPIC if required
TOPIC
SampleProducer as Java application with all dependent jars in the CLASSPATH (eg. from IDE).
| Constructor and Description |
|---|
SampleProducer(String bootstrapServers) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
main(String[] args) |
void |
sendMessages(String topic,
int count,
CountDownLatch latch) |
public SampleProducer(String bootstrapServers)
public void sendMessages(String topic, int count, CountDownLatch latch) throws InterruptedException
InterruptedExceptionpublic void close()