-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(pubsublite): Message type and message routers #3077
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll defer to Alex
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.