Java ActiveMq生产者将JMS消息发送到目标队列需要更长的时间

Java ActiveMq生产者将JMS消息发送到目标队列需要更长的时间,java,apache-camel,activemq,Java,Apache Camel,Activemq,我们正面临一个问题,从camel-javadsl路由向特定队列发送JMS消息需要将近20秒,这对我们来说是非常糟糕的响应。这里只运行单线程,没有多线程 你能给我一些建议吗?延误的原因是什么。这是由于ActiveMq代理配置中启用了生产者流控制而导致生产者挂起的场景吗。如果是,如何处理 请在此处查找日志: 015-11-13 12:25:43733 | DEBUG | r[获取查询队列]| JmsConfiguration |162-org.apache.camel.camel-jms-2.10.

我们正面临一个问题,从camel-javadsl路由向特定队列发送JMS消息需要将近20秒,这对我们来说是非常糟糕的响应。这里只运行单线程,没有多线程

你能给我一些建议吗?延误的原因是什么。这是由于ActiveMq代理配置中启用了生产者流控制而导致生产者挂起的场景吗。如果是,如何处理

请在此处查找日志:

015-11-13 12:25:43733 | DEBUG | r[获取查询队列]| JmsConfiguration |162-org.apache.camel.camel-jms-2.10.2.1-SNAPSHOT |发送jms 信息发送至:temp-queue://ID:test-入口-01-53869-1447403844710-5:1:6 带有消息:ActiveMQObjectMessage{commandId=0,需要响应= false,messageId=null,originalDestination=null, originalTransactionId=null,producerId=null,destination=null, transactionId=null,到期日=1447406874046,时间戳=0, arrival=0,BrokerInput=0,BrokerRoutTime=0,correlationId= 骆驼-ID-msc-01-58624-1447403845629-15-4289

2015-11-13 12:26:03355调试r[获取查询队列]| 临时队列回复管理器| 162-org.apache.camel.camel-jms- 2.10.2.1-SNAPSHOT |接收到的回复消息,其相关ID为[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,目的地= 临时工-queue://test-portal-01-53869-1447403844710-5:1:6,事务ID= null,过期时间=0,时间戳=1447406743733,到达时间=0, BrokerTime=1447406763354,BrokerRoutTime=1447406763354, 相关ID= Camel-ID-msc-01-58624-1447403845629-15-4289

2015-11-13 12:25:39046 |调试|[检索|查询]| JmsConfiguration | 162-org.apache.camel.camel-jms-2.10.2.1-SNAPSHOT |将jms消息发送至:queue://GET_QUERY_QUEUE 带有消息:ActiveMQObjectMessage{commandId=0,responseRequired=false,messageId=null,originalDestination=null,originalTransactionId=null,producerId=null,destination=null,transactionId=null,expiration=1447406870890,timestamp=0,arrival=0,BrokerPrintTime=0,BrokerRoutTime=0,correlationId=Camel-ID-msc-01-58624-1447403845629-15-4289


2015-11-13 12:25:43624 | DEBUG | r[GET|u QUERY | QUEUE]| EndpointMessageListener | 162-org.apache.camel.camel-jms-2.10.2.1-SNAPSHOT | Endpoint[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,producerId=ID:msc-pcen-portal-01-53869-1447403844710-5:1:125:101,destination=queue://GET_QUERY_QUEUE,transactionId=null,到期日=1447406874046,时间戳=1447406739046,arrival=0,brokertime=1447406743623,brokerOutTime=1447406743623,correlationId=Camel-ID-msc-01-58624-1447403845629-15-4289,

听起来像是在错误地通过JMS进行请求/回复,bt默认使用20秒的超时来等待回复消息。如果您只想向着火的队列发送消息,而忘记style、 然后确保将消息交换模式设置为InOnly

看看这些EIP


感谢您的回复,Claus lnsen。GET_QUERY_QUEUE上定义的驼峰路由是InOut,这是故意的。但在驼峰路由中,为什么在尝试向临时队列发送消息和time temp QUEUE获取消息之间会有20秒的延迟。这20秒的时间不是恒定的,有时是8-10秒,但仍然很长!!我已更新了上面的日志。生产者无法向队列发送消息,或者消费者/路由无法快速响应。不是吗?