summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-07 12:33:06 -0700
committermo khan <mo@mokhan.ca>2015-02-07 12:33:06 -0700
commit65145e6be87df7b0440fb98c11abc23a2b3c49ed (patch)
tree026e5260bf03be83d38d454028023316a555a1ea /app/services
parent2bbe4091b513ab40b0540a1315c8946ade21b476 (diff)
use a single topic exchange instead of multiple fanout exchanges.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/publisher.rb6
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