SpringBoot集成RabbitMQ启动失败,报404找不到queue

  SpringBoot
  RabbitMQ
1
0
0
字数:34086
博主: 勤勇学
发布于: 2024-08-02 00:09:40
原创声明:文章所有权为创作者【原创】所有,未经许可,不得转载!
目录
未发现目录
2023-12-04 11:19:06.571 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:06.606 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:0/SimpleConnection@27ea7c8f [delegate=amqp://root@192.168.160.100:5672/, localPort= 60138]
2023-12-04 11:19:06.621 INFO  [main] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:06.688 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:06.694 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:06.698 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:1/SimpleConnection@41ad6c00 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60139]
2023-12-04 11:19:07.710 INFO  [main] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:07.712 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:07.715 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:07.719 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:2/SimpleConnection@57f83dc7 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60143]
2023-12-04 11:19:09.731 INFO  [main] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:09.734 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:09.736 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:09.740 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:3/SimpleConnection@ea3491d [delegate=amqp://root@192.168.160.100:5672/, localPort= 60147]
2023-12-04 11:19:13.742 INFO  [main] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:13.744 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:13.747 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:13.753 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:4/SimpleConnection@76a86677 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60156]
2023-12-04 11:19:18.765 INFO  [main] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:18.767 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:18.770 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:18.774 INFO  [main] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:5/SimpleConnection@4b02dc4e [delegate=amqp://root@192.168.160.100:5672/, localPort= 60158]
2023-12-04 11:19:18.776 INFO  [main] [o.s.a.r.l.SimpleMessageListenerContainer] - Broker not available; cannot force queue declarations during start: java.io.IOException
2023-12-04 11:19:18.797 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:18.799 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:18.800 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:18.803 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:6/SimpleConnection@3bc83a2b [delegate=amqp://root@192.168.160.100:5672/, localPort= 60159]
2023-12-04 11:19:18.803 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:18.807 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:18.808 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:18.811 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:7/SimpleConnection@6a18ea97 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60160]
2023-12-04 11:19:19.807 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#0-1] [o.s.a.r.l.SimpleMessageListenerContainer] - Restarting Consumer@6db59e26: tags=[[amq.ctag-T1VBmsPfMKuIzrooa6W-7g]], channel=Cached Rabbit Channel: PublisherCallbackChannelImpl: AMQChannel(amqp://root@192.168.160.100:5672/,1), conn: Proxy@76a1cc1a Shared Rabbit Connection: SimpleConnection@6a18ea97 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60160], acknowledgeMode=AUTO local queue size=0
2023-12-04 11:19:19.821 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:19.822 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:19.824 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:19.829 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:8/SimpleConnection@395463c0 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60163]
2023-12-04 11:19:21.837 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:21.840 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:21.841 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:21.846 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:9/SimpleConnection@220133e4 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60166]
2023-12-04 11:19:25.857 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:25.860 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:25.861 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:25.864 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:10/SimpleConnection@11da6edb [delegate=amqp://root@192.168.160.100:5672/, localPort= 60179]
2023-12-04 11:19:30.879 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.RabbitAdmin] - Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.gen-OSK4vmROSxyoQkkLCGrHww) durable:false, auto-delete:true, exclusive:true. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2023-12-04 11:19:30.882 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Attempting to connect to: [192.168.160.100:5672]
2023-12-04 11:19:30.884 WARN  [AMQP Connection 192.168.160.100:5672] [c.r.c.i.ForgivingExceptionHandler] - An unexpected connection driver error occured (Exception message: Connection reset)
2023-12-04 11:19:30.888 INFO  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.c.CachingConnectionFactory] - Created new connection: rabbitConnectionFactory#83e5898:11/SimpleConnection@37bfdaf6 [delegate=amqp://root@192.168.160.100:5672/, localPort= 60190]
2023-12-04 11:19:30.891 ERROR [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.SimpleMessageListenerContainer] - Failed to check/redeclare auto-delete queue(s).
org.springframework.amqp.AmqpIOException: java.io.IOException
	at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:70)
	at org.springframework.amqp.rabbit.connection.RabbitAccessor.convertRabbitAccessException(RabbitAccessor.java:113)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2194)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2140)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2120)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.initialize(RabbitAdmin.java:604)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.lambda$null$10(RabbitAdmin.java:532)
	at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329)
	at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:209)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.lambda$afterPropertiesSet$11(RabbitAdmin.java:531)
	at org.springframework.amqp.rabbit.connection.CompositeConnectionListener.lambda$onCreate$0(CompositeConnectionListener.java:38)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
	at org.springframework.amqp.rabbit.connection.CompositeConnectionListener.onCreate(CompositeConnectionListener.java:38)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:730)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createBareChannel(CachingConnectionFactory.java:675)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.access$700(CachingConnectionFactory.java:99)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1178)
	at com.sun.proxy.$Proxy196.exchangeDeclare(Unknown Source)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchanges(RabbitAdmin.java:688)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.lambda$initialize$12(RabbitAdmin.java:605)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.invokeAction(RabbitTemplate.java:2229)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2188)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2140)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2120)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.initialize(RabbitAdmin.java:604)
	at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.attemptDeclarations(AbstractMessageListenerContainer.java:1916)
	at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.redeclareElementsIfNecessary(AbstractMessageListenerContainer.java:1893)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1347)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.exchangeDeclare(ChannelN.java:783)
	at com.rabbitmq.client.impl.ChannelN.exchangeDeclare(ChannelN.java:46)
	at org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl.exchangeDeclare(PublisherCallbackChannelImpl.java:287)
	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:566)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1157)
	at com.sun.proxy.$Proxy196.exchangeDeclare(Unknown Source)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchanges(RabbitAdmin.java:688)
	at org.springframework.amqp.rabbit.core.RabbitAdmin.lambda$initialize$12(RabbitAdmin.java:605)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.invokeAction(RabbitTemplate.java:2229)
	at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2188)
	... 27 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=503, reply-text=COMMAND_INVALID - unknown exchange type 'x-delayed-message', class-id=40, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 40 common frames omitted
2023-12-04 11:19:30.897 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Failed to declare queue: spring.gen-OSK4vmROSxyoQkkLCGrHww
2023-12-04 11:19:30.898 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Queue declaration failed; retries left=3
org.springframework.amqp.rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[spring.gen-OSK4vmROSxyoQkkLCGrHww]
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:743)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.passiveDeclarations(BlockingQueueConsumer.java:620)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:607)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1348)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:1012)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:46)
	at org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl.queueDeclarePassive(PublisherCallbackChannelImpl.java:358)
	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:566)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1157)
	at com.sun.proxy.$Proxy196.queueDeclarePassive(Unknown Source)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:721)
	... 5 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 15 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	... 1 common frames omitted
2023-12-04 11:19:35.904 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Failed to declare queue: spring.gen-OSK4vmROSxyoQkkLCGrHww
2023-12-04 11:19:35.904 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Queue declaration failed; retries left=2
org.springframework.amqp.rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[spring.gen-OSK4vmROSxyoQkkLCGrHww]
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:743)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.passiveDeclarations(BlockingQueueConsumer.java:620)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:607)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1348)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:1012)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:46)
	at org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl.queueDeclarePassive(PublisherCallbackChannelImpl.java:358)
	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:566)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1157)
	at com.sun.proxy.$Proxy196.queueDeclarePassive(Unknown Source)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:721)
	... 5 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 15 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	... 1 common frames omitted
2023-12-04 11:19:40.909 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Failed to declare queue: spring.gen-OSK4vmROSxyoQkkLCGrHww
2023-12-04 11:19:40.909 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Queue declaration failed; retries left=1
org.springframework.amqp.rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[spring.gen-OSK4vmROSxyoQkkLCGrHww]
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:743)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.passiveDeclarations(BlockingQueueConsumer.java:620)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:607)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1348)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:1012)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:46)
	at org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl.queueDeclarePassive(PublisherCallbackChannelImpl.java:358)
	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:566)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1157)
	at com.sun.proxy.$Proxy196.queueDeclarePassive(Unknown Source)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:721)
	... 5 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 15 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	... 1 common frames omitted
2023-12-04 11:19:45.926 WARN  [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.BlockingQueueConsumer] - Failed to declare queue: spring.gen-OSK4vmROSxyoQkkLCGrHww
2023-12-04 11:19:45.927 ERROR [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-1] [o.s.a.r.l.SimpleMessageListenerContainer] - Consumer threw missing queues exception, fatal=true
org.springframework.amqp.rabbit.listener.QueuesNotAvailableException: Cannot prepare queue for listener. Either the queue doesn't exist or the broker will not allow us to use it.
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.handleDeclarationException(BlockingQueueConsumer.java:693)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.passiveDeclarations(BlockingQueueConsumer.java:627)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:607)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1348)
	at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.springframework.amqp.rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s):[spring.gen-OSK4vmROSxyoQkkLCGrHww]
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:743)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.passiveDeclarations(BlockingQueueConsumer.java:620)
	... 4 common frames omitted
Caused by: java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:1012)
	at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:46)
	at org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl.queueDeclarePassive(PublisherCallbackChannelImpl.java:358)
	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:566)
	at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:1157)
	at com.sun.proxy.$Proxy196.queueDeclarePassive(Unknown Source)
	at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:721)
	... 5 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 15 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'spring.gen-OSK4vmROSxyoQkkLCGrHww' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	... 1 common frames omitted

使用RabbitMQ中间件运行出现上面的问题

尝试安装RabbitMQ延迟插件

https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases

按照自己版本的下载

找到RabbitMQ的插件目录,把下载的后缀为ez的插件包复制进去

rabbitmq-plugins enable rabbitmq_delayed_message_exchange

重启一下RabbitMQ服务即可

目录
未发现目录