Skip to content

Instantly share code, notes, and snippets.

@l1x

l1x/why.clj Secret

Created March 13, 2015 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/110ae53629b8579143ac to your computer and use it in GitHub Desktop.
Save l1x/110ae53629b8579143ac to your computer and use it in GitHub Desktop.
shovel.consumer=> (def a (KafkaConsumer. lofasz))
DEBUG 2015-03-12 17:05:54,569 [nREPL-worker-6] : Kafka consumer started
#'shovel.consumer/a
shovel.consumer=> (type a)
org.apache.kafka.clients.consumer.KafkaConsumer
shovel.consumer=> (doseq [m (.getMethods KafkaConsumer)] (println "Method Name: " (.getName m)))
Method Name: position
Method Name: poll
Method Name: close
Method Name: metrics
Method Name: seek
Method Name: offsetsBeforeTime
Method Name: subscribe
Method Name: subscribe
Method Name: unsubscribe
Method Name: unsubscribe
Method Name: committed
Method Name: commit
Method Name: commit
Method Name: wait
Method Name: wait
Method Name: wait
Method Name: equals
Method Name: toString
Method Name: hashCode
Method Name: getClass
Method Name: notify
Method Name: notifyAll
shovel.consumer=> (. a subscribe "test-shovel-0")
IllegalArgumentException No matching method found: subscribe for class org.apache.kafka.clients.consumer.KafkaConsumer clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment