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

BufferSerializer not able to work with "core" Buffer #109

Open
matzew opened this issue Jun 15, 2018 · 2 comments
Open

BufferSerializer not able to work with "core" Buffer #109

matzew opened this issue Jun 15, 2018 · 2 comments

Comments

@matzew
Copy link
Contributor

matzew commented Jun 15, 2018

When using the rx-java2 package, the IDE suggests using the reactivex package for various classes, including Buffer. However that's not really working, when using the BufferDeserializer.

io.reactivex.exceptions.OnErrorNotImplementedException: io.vertx.core.buffer.impl.BufferImpl cannot be cast to io.vertx.reactivex.core.buffer.Buffer
	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
	at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79)
	at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:69)
	at io.vertx.reactivex.core.impl.FlowableReadStream$1.onNext(FlowableReadStream.java:95)
	at io.reactivex.processors.UnicastProcessor.drainRegular(UnicastProcessor.java:213)
	at io.reactivex.processors.UnicastProcessor.drain(UnicastProcessor.java:289)
	at io.reactivex.processors.UnicastProcessor.onNext(UnicastProcessor.java:349)
	at io.vertx.reactivex.core.impl.FlowableReadStream$1.lambda$onSubscribe$1(FlowableReadStream.java:85)
	at io.vertx.kafka.client.consumer.impl.KafkaConsumerImpl.lambda$handler$1(KafkaConsumerImpl.java:77)
	at io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl.run(KafkaReadStreamImpl.java:206)
	at io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl.lambda$schedule$7(KafkaReadStreamImpl.java:167)
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:339)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: io.vertx.core.buffer.impl.BufferImpl cannot be cast to io.vertx.reactivex.core.buffer.Buffer
	at io.streamzi.strombrau.router.kafka.KafkaInputConsumer.lambda$null$0(KafkaInputConsumer.java:51)
	at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65)
	... 15 more
@matzew
Copy link
Contributor Author

matzew commented Jun 15, 2018

I think using the core one is fine, but it's not 100% clear to me why the CodeGen does generate the other one for reactivex.

Question: should the Deserializer work w/ the reactivex one? or should it be "leveraging" the codegen mechanism ?

@vietj
Copy link
Contributor

vietj commented Jun 15, 2018

I believe we need to have a specific serializer for code code buffer wrapper or find another solution

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

No branches or pull requests

2 participants