ActiveMq Producer花费更长的时间将JMS消息发送到目标队列

时间:2015-11-13 14:10:46

标签: java apache-camel activemq

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

请你指点一下,可能是造成延误的原因。由于在ActiveMq代理配置中启用了生产者流控制,是生产者挂起的情况吗?如果是的话,该怎么处理?

请在此处查找日志:

  

015-11-13 12:25:43,433 |调试| r [GET_QUERY_QUEUE] | JmsConfiguration   | 162 - org.apache.camel.camel-jms - 2.10.2.1-SNAPSHOT |发送JMS   消息:temp-queue:// ID:test-portal-01-53869-1447403844710-5:1:6   消息: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 =   骆驼-ID-MSC-01-58624-1447403845629-15-4289

     

2015-11-13 12:26:03,355 |调试| r [GET_QUERY_QUEUE] |   TemporaryQueueReplyManager | 162 - org.apache.camel.camel-jms -   2.10.2.1-SNAPSHOT |收到的具有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 =   骆驼-ID-MSC-01-58624-1447403845629-15-4289,

2015-11-13 12:25:39,046 |调试| [RETRIEVAL_QUERY] | 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,brokerInTime = 0,brokerOutTime = 0,correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289

2015-11-13 12:25:43,424 |调试| r [GET_QUERY_QUEUE] | EndpointMessageListener | 162 - org.apache.camel.camel-jms - 2.10.2.1-SNAPSHOT |消费者收到JMS消息的端点[jmsvm:// queue:GET_QUERY_QUEUE?concurrentConsumers = 1& maxConcurrentConsumers = 10]: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,expiration = 1447406874046,timestamp = 1447406739046,arrival = 0,brokerInTime = 1447406743623,brokerOutTime = 1447406743623,correlationId = Camel-ID-msc-01-58624-1447403845629-15-4289,

1 个答案:

答案 0 :(得分:2)

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

了解这些EIP