diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-07 12:33:06 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-07 12:33:06 -0700 |
| commit | 65145e6be87df7b0440fb98c11abc23a2b3c49ed (patch) | |
| tree | 026e5260bf03be83d38d454028023316a555a1ea /app/services | |
| parent | 2bbe4091b513ab40b0540a1315c8946ade21b476 (diff) | |
use a single topic exchange instead of multiple fanout exchanges.
Diffstat (limited to 'app/services')
| -rw-r--r-- | app/services/publisher.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/publisher.rb b/app/services/publisher.rb index ef940e8..704f1e3 100644 --- a/app/services/publisher.rb +++ b/app/services/publisher.rb @@ -1,7 +1,7 @@ class Publisher - def self.publish(exchange, message = {}) - exchange = channel.fanout("malwer.#{exchange}") - exchange.publish(message.to_json) + def self.publish(routing_key, message = {}) + exchange = channel.topic("malwer") + exchange.publish(message.to_json, routing_key: routing_key) end def self.channel |
