kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devin Smith <dsm...@redcurrent.com>
Subject New simple producer examples?
Date Thu, 06 Aug 2015 02:34:43 GMT
Hi,

I'm brand new to kafka, and I'm trying to get a new simple producer working.

I'm starting up a simple test env:

docker run -d --name zookeeper -p 2181:2181 confluent/zookeeper

docker run -d --name kafka --link zookeeper:zookeeper -p 9092:9092
confluent/kafka

and trying to run the following code:

https://gist.github.com/devinrsmith/5466ba2dcffa32583043

It's successfully connecting, but the send doesn't seem to be returning:

"main" #1 prio=5 os_prio=31 tid=0x00007f807180a000 nid=0xd03 waiting on
condition [0x000000010e884000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000007ab590320> (a
java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at
org.apache.kafka.clients.producer.internals.ProduceRequestResult.await(ProduceRequestResult.java:58)
at
org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:42)
at
org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:25)
at com.devinrsmith.kafkadb.SimpleProducer.main(SimpleProducer.java:22)

Any help would be much appreciated!

Thanks,
-Devin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message