Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function(rabbit, subscribeTo) {
- return rabbit.configure({
- connection: {
- user: 'guest',
- pass: 'guest',
- server: [
- process.env.RABBITMQ_HOSTNAME
- ],
- port: 5672,
- vhost: '%2f',
- },
- exchanges: [
- {
- name: 'example-events-x',
- type: 'topic',
- autoDelete: false
- }
- ],
- queues: [
- {
- name: 'events_worker',
- autoDelete: false,
- subscribe: subscribeTo === 'example-events'
- }
- ],
- bindings: [
- {
- exchange: 'example-events-x',
- target: 'events_worker',
- keys: ['#']
- }
- ]
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement