Skip to content
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

Fix issue where proto3 clients could not subscribe to $all #1886

Merged
merged 1 commit into from Apr 30, 2019

Conversation

shaan1337
Copy link
Member

Fixes: #1677

An empty string to SubscribeToStream() is interpreted as subscribing to $all by EventStore.

We currently use proto2 on server side.
In proto3, default values (empty string for strings) are omitted and not serialized on the wire (also explained by @prolic in the above issue):
https://developers.google.com/protocol-buffers/docs/proto3#default

This means that a proto3 client trying to subscribe to $all with a proto2 server will result in a null value for the stream id when deserialized on the server side.

The patch simply sets the stream id back to an empty string if it's null.

@shaan1337 shaan1337 requested a review from jageall April 30, 2019 06:14
@jageall jageall merged commit 461ac04 into master Apr 30, 2019
@shaan1337 shaan1337 deleted the proto3-subscribe-to-all-fix branch May 13, 2019 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Problem subscribing to $all
2 participants