Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException [Lorg.apache.kafka.common.TopicPartition; cannot be cast to java.util.Collection #4

Open
sgrove opened this issue Aug 3, 2016 · 1 comment

Comments

@sgrove
Copy link

sgrove commented Aug 3, 2016

I may be using this wrong, but I believe it's the same as in the examples:

(with-open [c (consumer/make-consumer cc key-deserializer value-deserializer options)]
 (franzy.clients.consumer.protocols/seek-to-end-offset! c [{:topic "trance" :partition 0}]))

Causes:

ClassCastException [Lorg.apache.kafka.common.TopicPartition; cannot be cast to java.util.Collection franzy.clients.consumer.client.FranzConsumer (client.clj:114)

@lbradstreet
Copy link

This is due to kafka 0.10.0 and a breaking change they made.

diff --git a/src/franzy/clients/codec.clj b/src/franzy/clients/codec.clj
index b89caa3..de50fe4 100644
--- a/src/franzy/clients/codec.clj
+++ b/src/franzy/clients/codec.clj
@@ -42,8 +42,7 @@
   [topic-partitions]
   (->> topic-partitions
        (maps->topic-partitions)
-       (into [])
-       (into-array TopicPartition)))
+       (into [])))

@ymilky are you planning on maintaining franzy at all? I'd be happy to make a collaborative effort with you if you're willing to do the releases, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants