daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jan 28th, 2016 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = function(rabbit, subscribeTo) {
  2.   return rabbit.configure({
  3.     connection: {
  4.       user: 'guest',
  5.       pass: 'guest',
  6.       server: [
  7.         process.env.RABBITMQ_HOSTNAME
  8.       ],
  9.       port: 5672,
  10.       vhost: '%2f',
  11.     },
  12.  
  13.     exchanges: [
  14.       {
  15.         name: 'example-events-x',
  16.         type: 'topic',
  17.         autoDelete: false
  18.       }
  19.     ],
  20.  
  21.     queues: [
  22.       {
  23.         name: 'events_worker',
  24.         autoDelete: false,
  25.         subscribe: subscribeTo === 'example-events'
  26.       }
  27.     ],
  28.  
  29.     bindings: [
  30.       {
  31.         exchange: 'example-events-x',
  32.         target: 'events_worker',
  33.         keys: ['#']
  34.       }
  35.     ]
  36.   });
  37. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top