# How to handle SerializationException with Alpakka Kafka consumer when working with Schema Registry?

**URL:** <https://discuss.akka.io/t/how-to-handle-serializationexception-with-alpakka-kafka-consumer-when-working-with-schema-registry/4423>\
**Category:** Akka Streams & Alpakka\
**Created:** [June 17, 2019, 10:33am UTC](https://discuss.akka.io/t/how-to-handle-serializationexception-with-alpakka-kafka-consumer-when-working-with-schema-registry/4423 "2019-06-17T10:33:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexanderzafirov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/alexanderzafirov/32/1751_2.png) [@alexanderzafirov](https://discuss.akka.io/u/alexanderzafirov)\
**Post date:** [June 17, 2019, 10:33am UTC](https://discuss.akka.io/t/how-to-handle-serializationexception-with-alpakka-kafka-consumer-when-working-with-schema-registry/4423/1 "2019-06-17T10:33:49Z")

</div>

Hello,

I’m using the latest release of akka-kafka - 1.0.4.  
I have read the following [thread](https://discuss.akka.io/t/handling-serializationexception-in-an-alpakka-kafka-consumer/2128) but it doesn’t seem to cover the situation of using schema registry to handle errors. I have been exploring this [pr](https://github.com/akka/alpakka-kafka/pull/615) but it seems that there is no way for the exception to bubble up to the decider added to a given stage. I have explored the tests but they don’t cover situations handling the error. I would like to skip over non deserializable records.

I am currently blocked without being able to progress consuming the stream. Any ideas are welcome.

---

<div class="post-metadata">

**Author:** ![ennru](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/ennru/32/1495_2.png) [@ennru](https://discuss.akka.io/u/ennru)\
**Post date:** [June 17, 2019, 5:51pm UTC](https://discuss.akka.io/t/how-to-handle-serializationexception-with-alpakka-kafka-consumer-when-working-with-schema-registry/4423/2 "2019-06-17T17:51:37Z")

</div>

Hi Alexander,

You are right, the Alpakka Kafka consumer (nor producer) do not honour supervision so there you can’t make it resume when deserialisation fails. You could wrap in in a [`RestartSource`](https://doc.akka.io/docs/alpakka-kafka/current/errorhandling.html#restarting-the-stream-with-a-backoff-stage), though.

This has been a long-standing [issue #319](https://github.com/akka/alpakka-kafka/issues/319) and [#796](https://github.com/akka/alpakka-kafka/issues/796) – contributions are welcome!

Cheers,  
Enno.
