feat(pubsublite): Message type and message routers#3077
feat(pubsublite): Message type and message routers#3077tmdiep merged 7 commits intogoogleapis:masterfrom
Conversation
|
Any opinions on the use of []byte everywhere in the Message struct are welcome. IMO, strings are much easier to work with. However, Lite uses bytestrings for everything. The Java client libraries for CPS and Lite also have different Message types, so perhaps this deviation is acceptable for Go too. |
|
WANT_LGTM=@hongalex, @manuelmenzella-google Do either of you have concerns about differing from pubsub.Message? It differs in the Java client libraries too, so I think it should be fine. I prefer strings over []byte, but had some concerns about actual bytes being written to the message in another client library and looking strange converted to a string when read from the Go client lib. |
|
I agree strings are easier to work with, but yeah considering people can use pub/sub lite across languages, this should be standardized across client libraries. I say stick with []byte. |
|
Thanks everyone, []bytes it is! Merging... |
Message is similar to pubsub.Message, with the following differences:
Message routers select a partition to route a published message to, based on whether it has an ordering key specified.