Is there a way to setup RabbitMQ in a way that the Firehose is autamatically enabled (for a single virtual host preferably) after a Windows or RabbitMQ service restart?
As described in Running RabbitMQ Server as a Service (on Windows) doc,
The service runs using the rabbitmq-service.bat script in sbin.
So you can customize it to get desired behavior.
Related
I am looking in for the best way to implement the RabbitMQ consumer by using .Net Client which should be run as windows service.
I referred the RabbitMQ documentation and found the way to consume messages by using .Net client (https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html).
My current scenario is like, RabbitMQ is installed in AWS VM machine. I have to install dotnet client consumer service resides in On-premise network which should consume messages.
Which one is the best way, to always listen the Queue (AMQP protocol) or HTTP API which should get messages on demand (https://pulse.mozilla.org/api/).
Please advise.
Thanks,
Vinoth
I believe the answer is "neither." You should have your message queue as a back-end service behind the firewall, and expose your application functionality through a set of carefully-specified web services. The web services, which are exposed through the firewall but can communicate to services behind the firewall, would produce messages that would be transmitted to the server. Any services needing to produce or consume messages would need to do so via the web services, which would perform safety/security checking prior to forwarding the request on to the AMQP server.
If you need to expose AMQP directly to clients (i.e. that is the purpose of your app), then the recommendation is to do so via STOMP. I think a valid use case for exposing AMQP directly over the internet would be a rare thing to come across. The security implications of doing so would be immense.
We are currently running RabbitMQ on our Windows server machine.
We want to switch to Linux server machine.
Our setup is on AWS.
We have already created a Linux machine and installed latest version of RabbitMQ in it.
Our client applications use IP to connect to RabbitMQ server. The linux server has an IP.
We would like to change the RabbitMQ server without any downtime. We have messages in Windows based RabbitMQ server and would like to move those messages as well.
What would be possible options in this scenario?
Is there a way to upgrade RabbitMQ software later without any downtime?
It's far easier if you don't need to move messages from one server to another.
I'd suggest this:
Run both servers in parallel
Create a bunch of new consumers ( a copy of all current consumers ) and make them consume from Linux server. At this moment, Linux server has no load yet.
Gradually switch producers from Windows to Linux server, monitoring the system.
Once all producers are switched, wait for queues on Windows server to be drained by existing consumers.
Once all queues are drained on Windows server, switch off Windows server's consumers.
You are done, all your load is on Linux server now
It is possible to proceed in such order:
Read and handle both servers on backend: old (Windows machine) and new (Linux machine) RabbitMQ server.
Toggle all the clients to write into new server only.
When queues in the old server are empty, old server will be no required anymore.
I am sort of new to cloud foundry. I have some queries -
Can I use REDIS as a service in Cloud Foundry , if yes , how. Do we need service broker as well for that.
Manifest file for deploying Redis on Cloud foundry in openstack Neutron.
Can I do HA of Redis service in CF.
I have been through these links as well
https://github.com/pivotal-cf/cf-redis-release
https://github.com/cloudfoundry-community/redis-boshrelease
and deployed redis with a dedicated node and broker but not sure how it will work with an app.
Yes, you can use Redis as a service in CF, and yes, you'll need to make sure that there is a service broker -- in fact, having a service broker is the definition of something being a CF Service (if you can write a service broker for it, you can use it as a service). Here's an overview of the CF Service Broker API. Once you have your Redis cluster and service broker set up, you'll need to do the following:
Register your service broker with cf create-service-broker redis-broker <username> <password> <url to service broker>.
Create a service instance: cf create-service redis <redis-plan-name> myRedis
Bind your app to the service instance: cf bind-service myApp myRedis
Building a manifest file depends on which Redis release you use. The cloudfoundry-community/redis-boshrelease has a template for generating an openstack manifest. Unfortunately, that release doesn't have a service broker so you can't use that redis as a service in CF. The pivotal-cf/cf-redis-release, on the other hand, does have a service broker. Maybe you can use the Openstack-specific properties from the cloudfoundry-community/redis-boshrelease to make an Openstack manifest for pivotal-cf/cf-redis-release?
I don't know too much about HA Redis. You'll have to get some help from Redis experts, but I do know that there's a piece of software called Sentinel that's meant to get Redis to HA. You should take a look at that and see if you can extend the release to include Sentinel.
Hope that helps!
We are implementing a service/message-bus feature in our SignalR application and have been looking at Redis, with automatic fail-over using Redis Sentiel. We would like to maintain our own servers and have read SignalR powered by Service Bus. Since this is a Winddows Azure implementation, how can I accomplish this in our internal network with VM's with automatic fail-over similar to the Redis solution discussed above?
You may want to look at Service Bus for Windows Server:
http://msdn.microsoft.com/en-us/library/windowsazure/jj193022(v=azure.10).aspx
It has API symmetry between Azure Service Bus and the Windows Server API (particularly for messaging: queues and topics/similar to SignalR). It doesn't include the caching and ACS services. However, if you want the Azure Service Bus - Caching...you can get that in:
AppFabric for Windows Server
http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx
I'm trying to figure out what is the best solution to work with rabbitmq cluster via wcf.
Current setup:
2 IIS web servers (act as message produces and post messages to queue via amqp wcf client).
2 servers with rabbitmq broker (clustered with mirrored queue, rabbit1 and rabbit2)
Windows service ( worker) with hosted amqp wcf service that listens to incoming messages.
Web role posts messages to rabbit1 node and worker listens to rabbit1 node too. If rabbit1 node fails system(both web and worker) should switch to rabbit2. And that's the question, how to implement this in more elegant way rather than handling connection failures in application code.
First and the only approach I see now is to use wcf4 routing backup endpoints feature. This way solves problem on client side(web role) only but doesn't solve problem on wcf service side(worker role).
One way is to create a wrapper around your service host, used for storing a list of connection strings (which can come from config).
Add a handler to the service faulted event, where you can close and reopen the host with a different connection string.