node-ts/bus

How to set up on different machines?

haayman-imagem opened this issue · 3 comments

I'm running a distributed setup with 2 different codebases. machine 1 creates orders and machine 2 handles them. Machine 2 has some handlers/workflows/messages that machine 1 doesn't know about.

What just happened: machine 2 tried to add some messages to the bus, but machine 1 took those messages off the queue complaining that it didn't know how to handle it.

How do I make sure machine 2's messages are kept apart? Is there a way to define 2 seperate messageQueus for RabbitMQ?

Hey, do you have a repo that demonstrates the issue?

Hi,

I think I just found the answer: using a different queueName on both machines does the trick. Both queues automatically bind to exchanges they can handle. Works great.
Thanks for the quick reply

Great, glad to hear