Skip to content

Conversation

sega-yarkin
Copy link

@sega-yarkin sega-yarkin commented Sep 5, 2016

Encoding strings use only binaries instead of xmerl_ucs:from_utf8 (which converts it to list) when convert to JSON, it saves some memory and makes RabbitMQ more stable.
We haven't had any issues on production after updating to this code.

@sega-yarkin
Copy link
Author

@michaelklishin
Copy link

@sega-yarkin I assume this can go into 3.6.x?

@sega-yarkin
Copy link
Author

@michaelklishin Yes, I tested this even in 3.5.7

@michaelklishin
Copy link

Can you please also submit this against the stable branch then?

1 similar comment
@michaelklishin
Copy link

Can you please also submit this against the stable branch then?

@michaelklishin michaelklishin self-assigned this Sep 7, 2016
@sega-yarkin
Copy link
Author

@michaelklishin sorry for dummy question, but what did you mean under stable branch? what should I do?

@michaelklishin
Copy link

I now see that this particular repo doesn't have the stable branch. Fair enough, there's nothing for you to do then :)

@essen
Copy link

essen commented Sep 9, 2016

It looks fine, but perhaps we should just switch to jsx or jiffy directly without having this intermediate step?

@michaelklishin
Copy link

I think it's fine to use this in 3.6.x.

On 9 sept 2016, at 23:57, Loïc Hoguin notifications@github.com wrote:

It looks fine, but perhaps we should just switch to jsx or jiffy directly without having this intermediate step?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@essen
Copy link

essen commented Sep 10, 2016

I have some errors when trying to run the tests. While on a quick glance it seems that it's just the tests that need updating (they're matching against lists instead of binary), it's possible an issue hides there.

I saw that you are new to Erlang so if it's a problem tell me and I'll update the tests directly. Thanks for the patch btw!

@sega-yarkin
Copy link
Author

@essen Thanks that you mentioned about tests, I forget about case when encode should return raw UTF8 bytes (because STOMP doesn't use this option), but I've written it for compatibility now.

Erlang itself is easy to learn language (I've written several RMQ plug-ins for our environment that work well in production already), but there are many tools around the language which I haven't known yet. Can you tell me how to run the tests? :-) Thanks!

@essen
Copy link

essen commented Sep 10, 2016

I'm not sure what's the proper way to do it to be honest. I had to do a little trick to make it work with the included rebar. Assuming a clean repo, in the modified file there's an -ifdef(TEST) line that I removed, and then also an -endif at the end also removed. From there, the command ./rebar get-deps eunit should work.

@sega-yarkin
Copy link
Author

@essen Thanks for your help! Now all tests passed, yay!))

@essen essen merged commit ddf91f0 into rabbitmq:master Sep 13, 2016
@essen
Copy link

essen commented Sep 13, 2016

Merged, thanks!

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.

3 participants