gpt4 book ai didi

java - 如何解决 jms 中无效的连接参数?

转载 作者:行者123 更新时间:2023-11-30 10:52:34 24 4
gpt4 key购买 nike

我正在使用 ActiveMQ 通过使用以下客户端 uri 将数据对象从客户端传输到服务器:

ssl://X.X.X.X:61616?useKeepAlive=false&wireFormat.maxInactivityDuration=30000&wireFormat.cacheEnabled=false&wireFormat.tightEncodingEnabled=true

通过使用上述 uri,当我启动应用程序时出现以下异常:

javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {useKeepAlive=false}
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:245)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
at com.infomindz.esdms.messaging.agent.job.handler.MessageQueueLocator.getSecureManagementJmsSession(MessageQueueLocator.java:991)
at com.infomindz.esdms.messaging.agent.job.handler.MessageQueueLocator.sendMessageToSEMQueue(MessageQueueLocator.java:902)
at com.infomindz.esdms.messaging.agent.job.MediaDriverStatusJob.saveAndSendPropertyDetails(Unknown Source)
at com.infomindz.esdms.messaging.agent.job.MediaDriverStatusJob.checkInitFile(Unknown Source)
at com.infomindz.esdms.messaging.agent.job.MediaDriverStatusJob.execute(Unknown Source)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: java.lang.IllegalArgumentException: Invalid connect parameters: {useKeepAlive=false}
at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:144)
at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)

如何解决此异常?

最佳答案

传输参数必须以“传输”为前缀。在网址中;所以你需要这样做:

ssl://X.X.X.X:61616?transport.useKeepAlive=false

参见 this page .

关于java - 如何解决 jms 中无效的连接参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34332352/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com