Super weird - first message (only) rejected #11385
Replies: 2 comments 8 replies
-
Hello, thanks for using RabbitMQ. It would be great to know the version of all the software you're using:
Is this message unrouteable or different from other messages in any way? If you can reproduce this issue every time, the fastest way to help us help you is provide a complete project that we can clone, compile, and run to see the issue. |
Beta Was this translation helpful? Give feedback.
-
@AdamNormanJenkins - after reading your last few messages, it's clear there are quite a few moving parts in your environment. Since this issue can be reproduced every time, you should be able to provide what we need to also reproduce it:
You may have found a bug, but more than likely there is something in your code or setup that needs to be fixed. Neither I nor anyone else on the RabbitMQ team can spend time speculating about what the issue is. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
I have a super weird error. I have a rabbit server with some queues and a configured dlq and I'm using spring JMS/Rabbit. Everything is working great, messages get queued, the message are dequeued and processed and when I throw an AmqpRejectAndDontRequeueException it goes to the DLQ just fine for analysis. With one very unusual exception - when I startup my app, everything startup fine (and RabbitMQ has been running for days, so only my app is restarted) and the application starts handling requests but the very first, and ONLY the first, message sent to rabbit goes directly to the DLQ and doesn't trigger the listener at all (I have debug breakpoints)! The second, third, fourth etc etc all work fine, just the first message. Nothing is showing up in either the app logs or the rabbit logs that would suggest what's happening and the dlq message gives the following reason:
x-first-death-exchange: my exchange
x-first-death-queue: connect
x-first-death-reason: rejected
Any thoughts? I'm really stumped here.
rabbitTemplate.convertAndSend(connectRoutingKey, message);
messages get dequeued with
@RabbitListener(queues = "${app.mq.queue.connect}", concurrency = "${app.mq.concurrency.connect}", containerFactory = "prefetchNoneRabbitListenerContainerFactory") public void recievedMessage(ProcessConnectionRequest request) throws ConnectorException { try { connectorService.registerAsInProgress(request.getConnectorConfigUuid()); connectorService.connect(request.getConnectorConfigUuid()); }catch(Throwable t){ log.error("!!!!ERROR PROCESSING CONNECTOR!!! [" + request.getConnectorConfigUuid() + "]", t); throw new AmqpRejectAndDontRequeueException("!!!!ERROR PROCESSING CONNECTOR!!! [" + request.getConnectorConfigUuid() + "]", t); } }
The contains factory is configured thus:
@Bean public SimpleRabbitListenerContainerFactory prefetchNoneRabbitListenerContainerFactory(ConnectionFactory rabbitConnectionFactory) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setPrefetchCount(0); factory.setMessageConverter(jsonMessageConverter()); factory.setConnectionFactory(rabbitConnectionFactory); return factory; }
rabbitmq: host: <host> port: 5671 username: <username> password: <password> virtual-host: / listener: direct: prefetch: 0 simple: prefetch: 0 ssl: enabled: true cache: connection: mode: CONNECTION
Beta Was this translation helpful? Give feedback.
All reactions