rabbitmq / rabbitmq-stomp

RabbitMQ STOMP plugin
https://www.rabbitmq.com/stomp.html
Other
49 stars 28 forks source link

Using term_to_binary to generate queue names is not forward-compatible #115

Closed hairyhum closed 7 years ago

hairyhum commented 7 years ago

In OTP-20 term_to_binary has changed atom encoding without a way to generate older version. term_to_binary hash is used in automatic queue name generation. Although, queue name generation does not use atoms, so binaries generated in 20 are not different from 19.3.

It still makes sense to not rely on term_to_binary hashes, because it can change in future versions.

The problem here is that it's used to generate queue names and renaming queues even in upgrade functions can be hard and cause bugs. As an option, we can generate a binary, which will be the same as term_to_binary output.

michaelklishin commented 7 years ago

@hairyhum I vote for generating 19.3-compatible binaries (as we already did in at least one other place) and considering it for 3.6.x.

hairyhum commented 7 years ago

Related to rabbitmq/rabbitmq-server#1243