RabbitMQ

MassTransit Consumer never receives message

▼魔方 西西 提交于 2020-07-16 07:20:49
问题 I'm building a demo application following along the documentation for using MassTransit with RabbitMQ and Autofac in an ASP.NET Core application: My program code: namespace MessageDemo { public class Program { public static void Main(string[] args) { var host = Host.CreateDefaultBuilder(args) .UseServiceProviderFactory(new AutofacServiceProviderFactory()) .ConfigureWebHostDefaults(webHostBuilder => { webHostBuilder .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration()

How to set x-dead-letter-exchange in Rabbit?

假装没事ソ 提交于 2020-07-10 10:25:21
问题 Here are my beans: @Bean public Queue igSmev3ListenerQueue() { Map<String, Object> args = new HashMap<>(); args.put("x-dead-letter-exchange", rabbitIgSmev3DlxProperties.getExchangeName()); args.put("x-dead-letter-routing-key", rabbitIgSmev3DlxProperties.getRoutingKey()); return new Queue(rabbitIgSmev3ListenerProperties.getQueueName(), true, false, false, args); } @Bean public Queue igSmev3DlxQueue() { return new Queue(rabbitIgSmev3DlxProperties.getQueueName(), true, false, false); } Here are

How to disable heartbeats with pika and rabbitmq

偶尔善良 提交于 2020-07-05 11:26:50
问题 I am using rabbitmq to facilitate some tasks from my rabbit server to my respective consumers. I have noticed that when I run some rather lengthy tests, 20+ minutes, my consumer will lose contact with the producer after it completes it's task. In my rabbit logs, I have seen the error closing AMQP connection <0.14009.27> (192.168.101.2:64855 -> 192.168.101.3:5672): missed heartbeats from client, timeout: 60s Also, I receive this error from pika pika.exceptions.ConnectionClosed: (-1, "error

How to disable heartbeats with pika and rabbitmq

强颜欢笑 提交于 2020-07-05 11:26:00
问题 I am using rabbitmq to facilitate some tasks from my rabbit server to my respective consumers. I have noticed that when I run some rather lengthy tests, 20+ minutes, my consumer will lose contact with the producer after it completes it's task. In my rabbit logs, I have seen the error closing AMQP connection <0.14009.27> (192.168.101.2:64855 -> 192.168.101.3:5672): missed heartbeats from client, timeout: 60s Also, I receive this error from pika pika.exceptions.ConnectionClosed: (-1, "error

Revoke a task from celery

橙三吉。 提交于 2020-07-04 20:56:11
问题 I want to explicitly revoke a task from celery. This is how I'm currently doing:- from celery.task.control import revoke revoke(task_id, terminate=True) where task_id is string (have also tried converting it into UUID uuid.UUID(task_id).hex) . After the above procedure, when I start celery again celery worker -A proj it still consumes the same message and starts processing it. Why? When viewed via flower , the message is still there in the broker section. how do I delete the message so that

Revoke a task from celery

∥☆過路亽.° 提交于 2020-07-04 20:55:47
问题 I want to explicitly revoke a task from celery. This is how I'm currently doing:- from celery.task.control import revoke revoke(task_id, terminate=True) where task_id is string (have also tried converting it into UUID uuid.UUID(task_id).hex) . After the above procedure, when I start celery again celery worker -A proj it still consumes the same message and starts processing it. Why? When viewed via flower , the message is still there in the broker section. how do I delete the message so that

Revoke a task from celery

北战南征 提交于 2020-07-04 20:55:31
问题 I want to explicitly revoke a task from celery. This is how I'm currently doing:- from celery.task.control import revoke revoke(task_id, terminate=True) where task_id is string (have also tried converting it into UUID uuid.UUID(task_id).hex) . After the above procedure, when I start celery again celery worker -A proj it still consumes the same message and starts processing it. Why? When viewed via flower , the message is still there in the broker section. how do I delete the message so that

RabbitMQ - access to vhost 'XXX' refused for user 'guest'

佐手、 提交于 2020-06-27 09:21:16
问题 I am using RabbitMQ 3.0.3 version. The service was working fine for last 4-5 years. Recently some updates patches were installed on the server and the Service stopped responding. This is what is happening: The RabbitMQ service (windows service) is running but not responding. In the log file I see error access to vhost 'XXX' refused for user 'guest' The management console is throwing site cannot be reached error What options do I have here? I cannot update RabbitMQ version as my code starts to

RabbitMQ broken pipe error or lost messages

末鹿安然 提交于 2020-06-27 08:03:38
问题 Using the pika library's BlockingConnection to connect to RabbitMQ, I occasionally get an error when publishing messages: Fatal Socket Error: error(32, 'Broken pipe') This is from a very simple sub-process that takes some information out of an in-memory queue and sends a small JSON message into AMQP. The error only seems to come up when the system hasn't sent any messages for a few minutes. Setup: connection = pika.BlockingConnection(parameters) channel = self.connection.channel() channel

How to send a XML file to RabbitMQ using Python?

拈花ヽ惹草 提交于 2020-06-27 04:22:45
问题 I am having an xml file called Test.xml which I am trying to send RabbitMQ using python. I know below deatails regarding the Rabbit MQ Hostname: xxx.xxxx.xxx AMQP Port (SSL) :4589 ESB Portal (Message Search): http://xxx.xxx.xxx:8585 RabbitMQ Web UI (https) :https://xxx.xxx.xxxx:15672 How can this be done from python? 回答1: This can be done using pika, you can read the file content and send it as a big string to RabbitMQ. And on the other side you can parse the content using ElementTree