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

Add a deserializer that return Either[ConsumerRecord[K, T], T] #32

Open
filosganga opened this issue Jan 29, 2018 · 2 comments
Open

Add a deserializer that return Either[ConsumerRecord[K, T], T] #32

filosganga opened this issue Jan 29, 2018 · 2 comments
Assignees

Comments

@filosganga
Copy link
Contributor

In some cases, you want to have the original ConsumerRecord when the deserialization fails. At the moment it is not possible.

We would like to write a deserializer that given a ConsumerRecord[K, V] will return Either[ConsumerRecord[K,V], V] for the value (Or Either[ConsumerRecord[K,V], V] for the Key).

@filosganga filosganga self-assigned this Jan 29, 2018
@PiotrFras
Copy link
Contributor

PiotrFras commented Jan 29, 2018

You might want to include the actual error (throwable) on the left side too.

final case class ConsumerFailure[K, V](thrown: Throwable, record: ConsumerRecord[K, V])

@filosganga
Copy link
Contributor Author

@PiotrFras Yep it is a very good idea! thanks

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

No branches or pull requests

2 participants