Closed geirolz closed 2 months ago
Quite big, not sure if I have time soon for it 😞
Quite big, not sure if I have time soon for it 😞
Np, let's release now and have a look to this when you have time.
I've changed a lot but I introduced just one braking change, AmqpProperties
now wants an instance of Headers
instead of Map
. I'll try to summarize all changes in the description in order to simplify the review
@matejcerny I've updated the description. I hope it helps
Here a recap of what's inside this PR:
❓Why so many files involved❓
model
object, that has grown and became too large to handle, intomodel
package, no breaking changes🔄 Changes:
Headers
type, a wrapper ofMap[String, AmqpFieldValue]
to provide utilsHeaderKey = String
type alias.AmqpFieldDecoder
andAmqpFieldEncoder
to decode and encodeAmqpFieldValue
values into scala types.:=
syntax toHeaderKey
in order to create a tuple of(HeaderKey, AmqpFieldValue)
encoding a genericT
into aAmqpFieldValue
using an implicitAmqpFieldEncoder
.asAmqpFieldValue
syntax to anyA
to encode them intoAmqpFieldValue
using an implicitAmqpFieldEncoder
.as[T]
syntax toAmqpFieldValue
to decode it to a genericT
using an implicitAmqpFieldDecoder
EnvelopeDecoder
(stringHeader, etc..) in favor ofheaderAs[IO, T]
💥 Breaking changes:
AmqpProperties
now accept and return an instance ofHeaders
instead of aMap[String, AmqpFieldValue]
. The map will be accessible in any case using the.toMap
method which exposes the underlying mapSome examples: