Comments on: Creating a RabbitMQ Cluster for Use with MassTransit https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/ **ARCHIVED** A Blog Loosely Related to System Architecture by David Prothero **ARCHIVED** Wed, 13 Apr 2016 15:32:00 +0000 hourly 1 https://wordpress.org/?v=5.8.6 By: Michael Denny https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-84 Wed, 13 Apr 2016 15:32:00 +0000 http://looselycoupledlabs.com/?p=46#comment-84 In reply to Andrew Lane.

In our scenario that is that big, we have 4 centralized brokers as state by Andrew, that are in cluster+HA(+sharding work in progress).

]]>
By: Nipun Joshi https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-53 Thu, 09 Apr 2015 17:50:00 +0000 http://looselycoupledlabs.com/?p=46#comment-53 Great series! Kudos and keep up the great writing.

What would be your recommendation in the scenario can both consume and publish messages. Also, there can be, let’s say 5 applications that participate in the process, each consumes from one queue, processes and then publishes back to an exchange with a different queue? So each application acts as a consumer as well as publisher.

My thought is that you can have a webserver running all the applications, and all talking to one RabbitMQ instance. Scale out this setup to other webservers and each webserver has its own dedicated RabbitMQ instance. All RMQ instances would be clustered. Mostly like the setup you mentioned above, the only difference being both the publisher and subscriber would have the same RMQ instance that they would talk to from one webserver, unless any RMQ instance goes down and in that case, the applications would throw “Send exception” while consuming or publishing. The exception should not be a problem as other webservers would continue to process the messages, since its a clustered RMQ environment.

Or would you prefer having a load balancer in between the webservers and RMQ cluster instead?

]]>
By: Faisal Nadeem https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-48 Sat, 17 Jan 2015 00:48:00 +0000 http://looselycoupledlabs.com/?p=46#comment-48 In reply to dprothero.

thanks David. I achieved it by downgrading MT to 2.6.5 and implemented distributor using MSMQ, distributor doesn’t work on latest MT build.

]]>
By: dprothero https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-47 Thu, 15 Jan 2015 03:44:00 +0000 http://looselycoupledlabs.com/?p=46#comment-47 In reply to Faisal Nadeem.

I have not done that, no. You might try the MassTransit mailing list. https://groups.google.com/forum/#!forum/masstransit-discuss

]]>
By: Faisal Nadeem https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-46 Tue, 13 Jan 2015 23:05:00 +0000 http://looselycoupledlabs.com/?p=46#comment-46 In reply to dprothero.

Actually there are real time transactions. I have developed a booking system. When request comes for trips search, i have to send response real time and to the same request. Any idea how can i send response out of message context?

]]>
By: dprothero https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-44 Tue, 13 Jan 2015 15:32:00 +0000 http://looselycoupledlabs.com/?p=46#comment-44 In reply to Faisal Nadeem.

No, I don’t think so, but it’s hard to know without seeing your code. You don’t want your consumers to be connecting to different instances of RabbitMQ because they will pull duplicate messages off the queue. Can you just change the endpoint for your reply message?

]]>
By: Faisal Nadeem https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-43 Mon, 12 Jan 2015 23:35:00 +0000 http://looselycoupledlabs.com/?p=46#comment-43 In reply to dprothero.

Yeah actually problem lies here. When i respond to context, context has EndPoint URI of rabbitmq://localhost/SAPTCO.WebWare1. That is why it is throwing the exception.
But if i install rabbitmq server on my both Virtual Servers with using same queue of SubMaster, it is responding back. But is it right mechanism?

]]>
By: dprothero https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-42 Mon, 12 Jan 2015 15:13:00 +0000 http://looselycoupledlabs.com/?p=46#comment-42 In reply to Faisal Nadeem.

I haven’t sent replies back to web applications. I would think, however, you would still want to use submaster to send the replies. Since all your rabbitmq servers are part of the same cluster, it will know how to route the messages (and hold onto them if the web server is down).

]]>
By: Faisal Nadeem https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-41 Mon, 12 Jan 2015 06:19:00 +0000 http://looselycoupledlabs.com/?p=46#comment-41 In reply to dprothero.

So as per my understanding i will not install RabbitMq server on both subscriber servers, and i will only initialize MassTransit on both machines and connect to Submaster to receive messages.

At first i did the same, both Subscriber machines are receiving the messages, but when i try to respond to context than it is throwing the exception as i mentioned earlier.

Probably it is trying to accesses the publisher rabbitmq://localhost/SAPTCO.WebWare1.
By the way when i connected to submaster and receiving messages, shall i respond directly to WebWare1 (Publisher)?

]]>
By: dprothero https://looselycoupledlabs.com/2014/07/creating-a-rabbitmq-cluster-for-use-with-masstransit/#comment-40 Mon, 12 Jan 2015 04:18:00 +0000 http://looselycoupledlabs.com/?p=46#comment-40 In reply to Faisal Nadeem.

Because you are using the competing consumer pattern you must connect to the submaster machine for receiving messages. Otherwise, you risk processing duplicate messages. You can also use submaster to send messages as that keeps the configuration simpler.

]]>