gpt4 book ai didi

java - ActiveMq Producer 需要更长的时间才能将 JMS 消息发送到目标队列

转载 作者:行者123 更新时间:2023-11-30 03:10:41 25 4
gpt4 key购买 nike

我们面临一个问题,从camel java DSL 路由向特定队列发送 JMS 消息,花费了近 20 秒,这对我们来说是非常糟糕的响应。这里仅以单线程运行,没有多线程。

能否请您指点一下,延迟的原因可能是什么?这是生产者挂起的场景吗,因为在 ActiveMq 代理配置中启用了生产者流控制。如果是,该如何处理?

请在此处查找日志:

015-11-13 12:25:43,733 | DEBUG | r[GET_QUERY_QUEUE] | JmsConfiguration | 162 - org.apache.camel.camel-jms - 2.10.2.1-SNAPSHOT | Sending JMS message to: temp-queue://ID:test-portal-01-53869-1447403844710-5:1:6 with message: ActiveMQObjectMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, expiration = 1447406874046, timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289

2015-11-13 12:26:03,355 | DEBUG | r[GET_QUERY_QUEUE] | TemporaryQueueReplyManager | 162 - org.apache.camel.camel-jms - 2.10.2.1-SNAPSHOT | Received reply message with correlationID [Camel-ID-msc-pcen-portal-01-58624-1447403845629-15-4289] -> ActiveMQObjectMessage {commandId = 70773, responseRequired = true, messageId = ID:msc-pcen-portal-01-53869-1447403844710-5:1:91:83:1, originalDestination = null, originalTransactionId = null, producerId = ID:msc-pcen-portal-01-53869-1447403844710-5:1:91:83, destination = temp-queue://test-portal-01-53869-1447403844710-5:1:6, transactionId = null, expiration = 0, timestamp = 1447406743733, arrival = 0, brokerInTime = 1447406763354, brokerOutTime = 1447406763354, correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289,

2015-11-13 12:25:39,046 |调试| [检索查询] | Jms配置 | 162 - org.apache.camel.camel-jms - 2.10.2.1-快照 |将 JMS 消息发送到:queue://GET_QUERY_QUEUE,消息:ActiveMQObjectMessage {commandId = 0,responseRequired = false,messageId = null,originalDestination = null,originalTransactionId = null, ProducerId = null,destination = null,transactionId = null,expiration = 1447406870890 ,时间戳= 0,到达= 0,brokerInTime = 0,brokerOutTime = 0,correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289

2015-11-13 12:25:43,624 |调试| r[获取查询队列] |端点消息监听器 | 162 - org.apache.camel.camel-jms - 2.10.2.1-快照 |端点[jmsvm://queue:GET_QUERY_QUEUE?concurrentConsumers=1&maxConcurrentConsumers=10]消费者收到JMS消息:ActiveMQObjectMessage {commandId = 70677,responseRequired = true,messageId = ID:msc-pcen-portal-01-53869-1447403844710-5:1 :125:101:1,originalDestination = null,originalTransactionId = null,生产者Id = ID:msc-pcen-portal-01-53869-1447403844710-5:1:125:101,destination =queue://GET_QUERY_QUEUE,transactionId = null ,过期= 1447406874046,时间戳= 1447406739046,到达= 0,brokerInTime = 1447406743623,brokerOutTime = 1447406743623,correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289,

最佳答案

听起来您错误地通过 JMS 进行请求/重新部署,并且 bt 默认使用 20 秒超时来等待回复消息。如果您只想以即发即忘的方式向队列发送消息,请确保将消息交换模式设置为 InOnly。

查看这些 EIP

关于java - ActiveMq Producer 需要更长的时间才能将 JMS 消息发送到目标队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33694665/

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