could not find implicit value for parameter conversion: com.spingo.op_rabbit.properties.FromHeaderValue[Boolean]
Because op-rabbit doesn't have an implementation for reading this type.
We've written this solution for our problem and it works great.
The only thing that I don't like (but I think that there's no other way, and if there's actually a different method to do it, please point it out for me) is the usage of asInstanceOf, but, being the value of the HeaderValue an Any, I can't find another way of doing this.
I hope that this could useful for someone else @DStranger :)
We've faced a case in where we needed to read a
Boolean
header from RabbitMQ. When you try to read a Boolean header like this:You get this error:
could not find implicit value for parameter conversion: com.spingo.op_rabbit.properties.FromHeaderValue[Boolean]
Because op-rabbit doesn't have an implementation for reading this type. We've written this solution for our problem and it works great.
The only thing that I don't like (but I think that there's no other way, and if there's actually a different method to do it, please point it out for me) is the usage of
asInstanceOf
, but, being thevalue
of theHeaderValue
anAny
, I can't find another way of doing this.I hope that this could useful for someone else @DStranger :)
Thank you!