Single vs. Multiple Buses

86 views
Skip to first unread message

Alon Amsalem

unread,
Nov 29, 2016, 9:24:17 AM11/29/16
to masstransit-discuss
Hi

Is it considered a bad practice to create multiple buses in a single process?

Is there a reason not to do that?

Thank You,

Alon Amsalem

Alon Amsalem

unread,
Nov 29, 2016, 10:14:11 AM11/29/16
to masstransit-discuss
Also, I'd appreciate it if someone could mention what are the use cases that does require creating additional bus instance

Chris Patterson

unread,
Nov 29, 2016, 11:17:57 AM11/29/16
to masstrans...@googlegroups.com
Since you can have multiple receive endpoints on a single bus, there is really no reason to create more than one bus in a process. Particularly since it can eventually exhaust the usable connection limits of most brokers. Each connection is a bunch of threads and sockets under the hood, and that all adds up over time.



--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/6b7d39e2-63fc-47ae-b8df-303249a2f9c6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Travis Smith

unread,
Nov 29, 2016, 11:24:37 AM11/29/16
to masstrans...@googlegroups.com
The only time I have had multiple buses is when I need to connect to multiple brokers. E.g. I have one RabbitMQ instance that does all the transactional data and sometime I need to shovel off messages to this subsystem that we keep on a different RabbitMQ instance/vhost. I would suggest the need for this is an edge case and most people won't require that system design. 

On Tue, Nov 29, 2016 at 8:17 AM Chris Patterson <ch...@phatboyg.com> wrote:
Since you can have multiple receive endpoints on a single bus, there is really no reason to create more than one bus in a process. Particularly since it can eventually exhaust the usable connection limits of most brokers. Each connection is a bunch of threads and sockets under the hood, and that all adds up over time.


On Tue, Nov 29, 2016 at 7:14 AM, Alon Amsalem <alon.a...@gmail.com> wrote:
Also, I'd appreciate it if someone could mention what are the use cases that does require creating additional bus instance

On Tuesday, November 29, 2016 at 4:24:17 PM UTC+2, Alon Amsalem wrote:
Hi

Is it considered a bad practice to create multiple buses in a single process?

Is there a reason not to do that?

Thank You,

Alon Amsalem

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYfuDLSyogq02eZBf3a%2B8eoHqa-b5TV0kwe0JH5dm4nnWA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
--
-Travis

Chris Patterson

unread,
Nov 29, 2016, 2:12:20 PM11/29/16
to masstrans...@googlegroups.com
Right, and you can have multiple hosts in a single bus now as well :)



On Tue, Nov 29, 2016 at 8:24 AM, Travis Smith <tra...@legomaster.net> wrote:
The only time I have had multiple buses is when I need to connect to multiple brokers. E.g. I have one RabbitMQ instance that does all the transactional data and sometime I need to shovel off messages to this subsystem that we keep on a different RabbitMQ instance/vhost. I would suggest the need for this is an edge case and most people won't require that system design. 

On Tue, Nov 29, 2016 at 8:17 AM Chris Patterson <ch...@phatboyg.com> wrote:
Since you can have multiple receive endpoints on a single bus, there is really no reason to create more than one bus in a process. Particularly since it can eventually exhaust the usable connection limits of most brokers. Each connection is a bunch of threads and sockets under the hood, and that all adds up over time.


On Tue, Nov 29, 2016 at 7:14 AM, Alon Amsalem <alon.a...@gmail.com> wrote:
Also, I'd appreciate it if someone could mention what are the use cases that does require creating additional bus instance

On Tuesday, November 29, 2016 at 4:24:17 PM UTC+2, Alon Amsalem wrote:
Hi

Is it considered a bad practice to create multiple buses in a single process?

Is there a reason not to do that?

Thank You,

Alon Amsalem

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
--
-Travis

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAAqUTbkUEGXJycLu0SkC36kx%3DgUn6GP4nGOSDYgkbGiMDyE%3D7A%40mail.gmail.com.

Travis Smith

unread,
Nov 29, 2016, 2:24:06 PM11/29/16
to masstrans...@googlegroups.com
Well, I'm not keeping up with all the features you ship Chris! So yeah, no reason to have multiple buses now. 

On Tue, Nov 29, 2016 at 11:12 AM Chris Patterson <ch...@phatboyg.com> wrote:
Right, and you can have multiple hosts in a single bus now as well :)



On Tue, Nov 29, 2016 at 8:24 AM, Travis Smith <tra...@legomaster.net> wrote:
The only time I have had multiple buses is when I need to connect to multiple brokers. E.g. I have one RabbitMQ instance that does all the transactional data and sometime I need to shovel off messages to this subsystem that we keep on a different RabbitMQ instance/vhost. I would suggest the need for this is an edge case and most people won't require that system design. 

On Tue, Nov 29, 2016 at 8:17 AM Chris Patterson <ch...@phatboyg.com> wrote:
Since you can have multiple receive endpoints on a single bus, there is really no reason to create more than one bus in a process. Particularly since it can eventually exhaust the usable connection limits of most brokers. Each connection is a bunch of threads and sockets under the hood, and that all adds up over time.


On Tue, Nov 29, 2016 at 7:14 AM, Alon Amsalem <alon.a...@gmail.com> wrote:
Also, I'd appreciate it if someone could mention what are the use cases that does require creating additional bus instance

On Tuesday, November 29, 2016 at 4:24:17 PM UTC+2, Alon Amsalem wrote:
Hi

Is it considered a bad practice to create multiple buses in a single process?

Is there a reason not to do that?

Thank You,

Alon Amsalem

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
--
-Travis

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYfZTN8%2BZvVAMhCQ3TK42YVg7QS3EgQkT31UH%3DjQyUOstA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
--
-Travis

Alon Amsalem

unread,
Nov 29, 2016, 4:48:45 PM11/29/16
to masstrans...@googlegroups.com

Thanks a lot for the detailed response


On Nov 29, 2016 9:24 PM, "Travis Smith" <tra...@legomaster.net> wrote:
Well, I'm not keeping up with all the features you ship Chris! So yeah, no reason to have multiple buses now. 

On Tue, Nov 29, 2016 at 11:12 AM Chris Patterson <ch...@phatboyg.com> wrote:
Right, and you can have multiple hosts in a single bus now as well :)



On Tue, Nov 29, 2016 at 8:24 AM, Travis Smith <tra...@legomaster.net> wrote:
The only time I have had multiple buses is when I need to connect to multiple brokers. E.g. I have one RabbitMQ instance that does all the transactional data and sometime I need to shovel off messages to this subsystem that we keep on a different RabbitMQ instance/vhost. I would suggest the need for this is an edge case and most people won't require that system design. 

On Tue, Nov 29, 2016 at 8:17 AM Chris Patterson <ch...@phatboyg.com> wrote:
Since you can have multiple receive endpoints on a single bus, there is really no reason to create more than one bus in a process. Particularly since it can eventually exhaust the usable connection limits of most brokers. Each connection is a bunch of threads and sockets under the hood, and that all adds up over time.


On Tue, Nov 29, 2016 at 7:14 AM, Alon Amsalem <alon.a...@gmail.com> wrote:
Also, I'd appreciate it if someone could mention what are the use cases that does require creating additional bus instance

On Tuesday, November 29, 2016 at 4:24:17 PM UTC+2, Alon Amsalem wrote:
Hi

Is it considered a bad practice to create multiple buses in a single process?

Is there a reason not to do that?

Thank You,

Alon Amsalem

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
--
-Travis

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
--
-Travis

--
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/cPam7iHrwik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAAqUTbn%3DfSx7BZ0z4uXHKL-nKapS1804NRzTQB_iNYhHsQfdHw%40mail.gmail.com.

Alexey Zimarev

unread,
Dec 1, 2016, 3:05:23 AM12/1/16
to masstransit-discuss
Travis, we now have a situation with two RabbitMQ instances, one is receiving massive number of events coming from thousands of endpoints and have very limited number of consumers. The other one is "business" side where domain events are being published and consumed. One service is consuming from one and publishing to another and it needs to buses.

maldworth

unread,
Dec 1, 2016, 9:24:59 AM12/1/16
to masstransit-discuss
I'm going to hop in with some questions and comments here :).

- comment: Chris said you can connect to multiple hosts in a single bus. This appears to be done when registering your endpoints, which host it will be receiving from, eg x.ReceiveEndpoint(host1...) or x.ReceiveEndpoint(host2...)
- question: if you want to publish using the IBusControl, which host would the published message go on? Or will it go on all the registered hosts?
- question: What situations do you typically use rabbitmq VHosts VS separate rabbitmq Instance?

I'm asking this because I will soon be having a scenario like this:

ServiceSolution1 (generic notifications, sending to any combination of e-mail, sms or mobile push, android/ios)

If I have SolutionA and SolutionB, completely separate domains, mutually exclusive. But, SolutionA and SolutionB will both be sending commands to ServiceSolution1 (has several routing slip activities of it's own) which will be responsible for sending the notification. I'm wondering is SolutionA, SolutionB and ServiceSolution1 should all exist on separate vhosts? Or if they should exist on separate instance? Or can they all exist in the same instance and I can let my Exchange/Message Namespaces to keep track.

Thanks
Reply all
Reply to author
Forward
0 new messages