Closed karthikmuralidharan closed 6 years ago
We did explore this in the early design, and just felt that []byte
more accurately represented what was really going on. I think we'd end up reading everything into a buffer anyway, so the io.Reader
would just be sugar, rather than being useful as a streaming protocol. And I was worried people would deliver gigantic payloads through the queue, which isn't recommended. Messages should be small and discrete.
@dahernan What do you think?
Hi,
I love the idea of this package and want to use it for a new service I'm working on with SQS integration.
I was wondering if it made sense to use
io.Reader
as the message type instead of directly using[]byte
for this package?So that we could directly pass the messages along to different decoders as necessary.
https://medium.com/@matryer/golang-advent-calendar-day-seventeen-io-reader-in-depth-6f744bb4320b