Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Mocking Delayed Message Exchange #271

Open
kamaubrian opened this issue Jan 31, 2022 · 1 comment
Open

Issue Mocking Delayed Message Exchange #271

kamaubrian opened this issue Jan 31, 2022 · 1 comment
Labels
question Related to how to use the tool

Comments

@kamaubrian
Copy link

I am using a delayed exchange and been trying to mock it. I am getting the following

Caused by: java.lang.IllegalArgumentException: No exchange type x-delayed-message at com.github.fridujo.rabbitmq.mock.exchange.MockExchangeFactory.build(MockExchangeFactory.java:31) at com.github.fridujo.rabbitmq.mock.MockNode.exchangeDeclare(MockNode.java:58) at com.github.fridujo.rabbitmq.mock.MockChannel.exchangeDeclare(MockChannel.java:244) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1184) at com.sun.proxy.$Proxy176.exchangeDeclare(Unknown Source) at org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchanges(RabbitAdmin.java:688) at org.springframework.amqp.rabbit.core.RabbitAdmin.lambda$declareExchange$0(RabbitAdmin.java:222) at org.springframework.amqp.rabbit.core.RabbitTemplate.invokeAction(RabbitTemplate.java:2151) at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2110) ... 96 more

Anyone got this before ?

@ledoyen ledoyen added the question Related to how to use the tool label Jan 31, 2022
@ledoyen
Copy link
Contributor

ledoyen commented Jan 31, 2022

Hi,
as a feature that is not built in RabbitMQ but comes from a plugin, it is not available by default in the mock either.

You need to register such an exchange through the Configuration.

You can find an example of this use here:

void mockExchangeFactory_register_new_mock_exchange() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Related to how to use the tool
Projects
None yet
Development

No branches or pull requests

2 participants