Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend] Fix crash when configuring exchange options for RabbitMQ
Bunny, the library we use for using rabbitmq, only accepts hash keys that are symbols. Any key that is not a symbol doesn't get applied by bunny. OBS was using with_indifferent_access for any hash passed to bunny to ensure that the bunny recognizes the hash as 'symbolized'. However with_indifferent_access creates and returns an ActiveSupport::HashWithIndifferentAccess instance, which isn't something bunny knows how to deal with. Therefore it still failed to apply the options. The solution is to use the symbolize_keys method to ensure that all hash keys are symbols, before passing them to bunny. Kudos goes to @coolo for debugging this.
- Loading branch information