-
Notifications
You must be signed in to change notification settings - Fork 84
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
Workaround - React Native STOMP issue because NULL chopping #55
Comments
Many thanks for this. I do not use React Native myself. This was earlier reported as slightly different issue Based on your analysis it seems, sending messages in binary bypasses the issue. I will wait for your results - based on that an option (say Making this change will control packets sent to the broker. However the communication may fail if the server sends a text packet. Some brokers (like RabbitMQ has an option to always send binary packets). |
A flag is added in configuration |
was it added to the package yet? |
Tried it and its working perfectly. |
Using only binaryMessages was causing other problems for me, so I found this to handle the error on the spring server:
The register this decorator with your websocket:
|
@WhiteHatTux hi, we tried your implementation without any luck :/ |
I think it may be worth trying to fix the underlying issue in React Native 😄 |
@kum-deepak yeah that would be better 👍 |
I was facing an issue where the stomp client doesn't get connected to server because of the null terminator and the connect message wasn't parsed at server side correctly because it was sent as string instead of binary array.
I did lots of debugging on it and the solution was to make isBinaryBody always true
like so
The text was updated successfully, but these errors were encountered: