-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support binary payload for the websocket sink #18037
Comments
I think you could be interested in this PR: #18019 |
@zamazan4ik For my specific use case, I only want to use |
Thanks @zhongchen ! I agree that it seems like we should avoid encoding as UTF-8 always. |
👋 Hi @zhongchen , thanks for opening a PR to address this. I think when Jesse said
He didn't mean that we should never encode as Will follow-up on the PR. |
A note for the community
Use Cases
I need to transfer proto-encoded data from a source to a WebSocket sink. Currently, the WebSocket sink converts the encoded payload into text before sending it over the wire using
from_utf8_lossy
. As a result, it corrupts my proto payload since proto payloads are not utf-8 strings.Attempted Solutions
No response
Proposal
Provide one additional option for the Websocket sink to choose between
Text
andBinary
payload for transferring the data.The underlying
Websocket
lib used by Vector supportsbinary
payload.https://docs.rs/websocket/latest/websocket/message/struct.Message.html#method.binary
References
No response
Version
No response
The text was updated successfully, but these errors were encountered: