简体   繁体   English

未使用 jmsListenerEndpointRegistry.start() 启动 JMS 侦听器

[英]Not starting the JMS listener using jmsListenerEndpointRegistry.start()

I am trying to start the JMS listener using jmsListenerEndpointRegistry.start() which was stopped using jmsListenerEndpointRegistry.stop().我正在尝试使用 jmsListenerEndpointRegistry.start() 启动 JMS 侦听器,该侦听器使用 jmsListenerEndpointRegistry.stop() 停止。 But looks like it is not getting started.但看起来它还没有开始。 When I am trying to consume the messages it is not allowing me to do so as it is still stopped.当我尝试使用消息时,它不允许我这样做,因为它仍然停止。 Please help me how to start it back using start method.请帮助我如何使用 start 方法重新启动它。 In application.properties I have spring.jms.listener.auto-startup=true在 application.properties 我有spring.jms.listener.auto-startup=true

Using Apache ActiveMQ(Version-5.16.3)使用 Apache ActiveMQ(版本 5.16.3)

2022-01-06 16:27:54.699  INFO 28804 --- [nio-9091-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 22 ms
2022-01-06 16:27:54.726 ERROR 28804 --- [nio-9091-exec-1] com.jms.poc.controller.JmsController     : --------- Trying to start JMS using jmsListenerEndpointRegistry.start()----------
2022-01-06 16:27:54.727 ERROR 28804 --- [nio-9091-exec-1] com.jms.poc.controller.JmsController     : ----------jmsListenerEndpointRegistry.isRunning()-------- : false

There is no need to change the autoStartup property in startJmsListener - that property only applies when the application context is initialized.无需更改startJmsListener autoStartup - 该属性仅在初始化应用程序上下文时适用。

You have no @JmsListenener s - the only one is commented out.您没有@JmsListenener s - 唯一一个被注释掉了。

registry.isRunning() only returns true when at least one of its containers is running. registry.isRunning()仅在其至少一个容器正在运行时才返回 true。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring引导JMS Listener - org.springframework.jms.config.JmsListenerEndpointRegistry.isAutoStartup()Z - Spring boot JMS Listener - org.springframework.jms.config.JmsListenerEndpointRegistry.isAutoStartup()Z 如何停止和启动 jms 侦听器 - How to stop and start jms listener 无法使用 JmsListenerEndpointRegistry 在 Spring Boot 中停止 JMS 使用者 - Not able to stop a JMS consumer in Spring Boot with JmsListenerEndpointRegistry 如何手动启动Spring JMS侦听器容器 - How to start Spring JMS listener container manually 在JVM集群中使用JMS的IBM MQ侦听器 - IBM MQ listener using JMS in a JVM cluster Wicket组件使用JMS侦听器自动刷新 - Wicket component auto refresh using JMS listener Spring - JMS,在JMS activemq服务器启动/停止几次后,侦听器服务器抛出java.io.EOFException,然后不连接到运行JMS - Spring - JMS , after couple of start/stop of JMS activemq server, listener server throws java.io.EOFException and then does not connect to running JMS Spring 启动:java.lang.AbstractMethodError:接收器类 org.springframework.jms.config.JmsListenerEndpointRegistry - Spring boot : java.lang.AbstractMethodError: Receiver class org.springframework.jms.config.JmsListenerEndpointRegistry 使用Java在jboss中使用MDB的JMS队列侦听器和发布者 - JMS Queue listener and publisher using MDB in jboss using java 在 SpringBoot 中调度 JMS 监听器 - Scheduling JMS listener in SpringBoot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM