Skip to content
Dorian edited this page Mar 31, 2018 · 2 revisions

this is a draft

Dealing with breaking changes when moving from 0.0.x to 0.1.x

These are the breaking changes:

  • Environmental queue names were removed

Keeping the environmental queue name

Sneakers 0.0.7 introduced a concept of an environmental queue, that is, a queue name that changes according to the current environment. For example:

logs_development # in dev
logs_production  # in prod

This was done automatically based on RACK_ENV. Community pushed towards dropping this feature, and using RabbitMQ vhosts instead.

If you want to keep this feature, this is how your worker should look like

# --- before ---
class MyWorker
   from_queue :logs
   :
   :
end

# --- after ---
class MyWorker
   from_queue "logs_#{ENV['RACK_ENV']}"
   :
   :
end