question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to declare queue

See original GitHub issue

Hello,

I’m using spring boot version 2.1.2.RELEASE, amqp-client:5.4.3 and rabbitmq-mock:1.0.9. When I try to mock the RabbitMQ Connection Factory like the showed example:

    @Bean
    public ConnectionFactory connectionFactory() {
        return new CachingConnectionFactory(MockConnectionFactoryFactory.build());
    }

I’m receiving error org.springframework.amqp.rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[****(name of queue)]

I was using this library with spring boot version 2.0.6.RELEASE it was working perfect.

Can you please check it 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vencivenccommented, Jan 19, 2019

@ledoyen Thank you ! Everything works just perfect now. Really appreciate you help.

0reactions
ledoyencommented, Jan 19, 2019

@vencivenc yes I created a patch through the website for the first time, and must have missed something. The PR is now available https://github.com/vencivenc/rabbitmq-mock-test/pull/1/files

Read more comments on GitHub >

github_iconTop Results From Across the Web

RabbitMQ Failed to declare queue and Listener is not able ...
A RabbitAdmin is required to declare the queues/bindings; the container only does a passive declaration to check the queue is present. EDIT
Read more >
"channel error" when declaring a queue with RabbitAdmin
Sometimes, declaring such queues fails with the following error, and I have trouble to understand why or to reproduce it with a minimal...
Read more >
spring-projects/spring-amqp
I'm going mad. I have a bunch of Queue beans declared in a Spring Boot app. On startup it connects to RabbitMQ and...
Read more >
RabbitMQ cannot be recovered if master node has restarted
I use this property to make spring boot always retry to connect to the master node which has the queue declaration to solve...
Read more >
Resolve rabbitmq declarationexception: failed to declare ...
BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[miaosha.queue] at org.springframework.amqp.rabbit.listener.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found