How can I recover unacknowledged AMQP messages from other channels than my connection’s own?

Unacknowledged messages are those which have been delivered across the network to a consumer but have not yet been ack’ed or rejected — but that consumer hasn’t yet closed the channel or connection over which it originally received them. Therefore the broker can’t figure out if the consumer is just taking a long time to … Read more

RabbitMQ and message priority

The answers on this question are out-of-date. As of RabbitMQ 3.5.0, there is now in-core support for AMQP standard per-message priorities. The documentation has all the gory details, but in short: You need to define the queue’s priority range at the time the queue is created; Messages without a priority set get a priority of … Read more

Accessing ASP.NET Core DI Container From Static Factory Class

You can avoid the static classes and use Dependency Injection all the way through combined with: The use of IApplicationLifetime to start/stop the listener whenever the application starts/stops. The use of IServiceProvider to create instances of the message processors. First thing, let’s move the configuration to its own class that can be populated from the … Read more

rabbitmq refusing to start

Rabbitmq is set to start automatically after it’s installed. I don’t think it is configured run with the service command. To see the status of rabbitmq sudo rabbitmqctl status To stop the rabbitmq sudo rabbitmqctl stop (Try the status command again to see that it’s stopped). To start it again, the recommended method is sudo … Read more

Microservices Why Use RabbitMQ?

In Microservices architecture you have two ways to communicate between the microservices: Synchronous – that is, each service calls directly the other microservice , which results in dependency between the services Asynchronous – you have some central hub (or message queue) where you place all requests between the microservices and the corresponding service takes the … Read more

rabbitmq-server fails to start after hostname has changed for first time

Remove the old installation of RabbitMQ to fix this problem. Here are steps to reinstall RabbitMQ. These commands are run as the root user: Stop RabbitMQ: rabbitmqctl stop Change /etc/hosts Change /etc/hostname Uninstall old RabbitMQ: dpkg -P rabbitmq-server Remove RabbitMQ’s database: rm -rf /var/lib/rabbitmq Find erlang’s process that is running rabbit: ps ax | grep … Read more

RabbitMQ (beam.smp) and high CPU/memory load issue

Finally I found the solution. These posts helped to figure this out. RabbitMQ on EC2 Consuming Tons of CPU and https://serverfault.com/questions/337982/how-do-i-restart-rabbitmq-after-switching-machines What happened was rabbitmq was holding on to all the results that were never freed to the point it became overloaded. I cleared all the stale data in /var/lib/rabbitmq/mnesia/rabbit/, restarted rabbit and it works … Read more