Apache的骆驼:回复收到未知的correlationID [英] Apache Camel: Reply received for unknown correlationID
问题描述
有在其他的两个软件组件中间件
。在中间件
我被 Apache的骆驼$ C $路由
的Apache ActiveMQ的
信息C>。
这是它如何工作的:
-
1stComponent
用来发送邮件到3rdComponent
-
3rdComponent
回复的消息,并将其返回到1
(使用中间件
)。1stComponent<< = GT;>中间件<< = GT;> 3rdComponent
中间件
问题:
我使用中间件 ConcurrentConsumers
。
在发送大量邮件顺序的,突然中间中间件
停止所有的进程!
有没有例外情况或消息!
例如,第一个500的100的消息得到了处理,而余留在队列中未决消息。
,该警报的过程中的中间有时记录
[WARN] TemporaryQueueReplyManager(骆驼(骆驼-1)线#11 - TemporaryQueueReplyManager [Q.MyQ):91 - 回复收到未知的correlationID [c551c7aa061f501c。该消息将被忽略:ActiveMQMapMessage {commandId = 2161,responseRequired = TRUE,MESSAGEID = ID:XXXXXXX,originalDestination = NULL,originalTransactionId = NULL,producerId = ID:XXXXXXX,目的地=临时队列:// ID:localhost.localdomain- 40961-1389890357282-3:1:1,transactionId,有无=零,到期= 0,时间戳= 1389890272360,到达= 0,brokerInTime = 1389890272360,brokerOutTime = 1389890272360,的correlationID = c551c7aa061f501c,的replyTo =临时队列:// ID:本地。 LOCALDOMAIN-40961-1389890357282-3:1:1,持续性=真,类型=空,优先级= 4的GroupID = NULL,groupSequence = 0,targetConsumerId = NULL,COM pressed = false时,用户ID = NULL,内容=空,marshalledProperties = org.apache.activemq.util.ByteSequence@19e19da,数据结构= NULL,redeliveryCounter = 0,大小= 0,属性= {breadcrumbId = ID:XXXXXXXXXXXXXX,标题= 300,CamelJmsDeliveryMode = 1},readOnlyProperties = TRUE, readOnlyBody = TRUE,可弃= FALSE,jmsXGroupFirstForConsumer = FALSE} {ActiveMQMapMessage = theTable {}}
这是中间件
code:
私有静态类MyRouteBuilder扩展RouteBuilder {
@覆盖
公共无效配置()抛出异常{
从(ActiveMQ的:队列:Q.Middleware concurrentConsumers = 1&安培; maxConcurrentConsumers = 10)
.threads(1,100)
.process(新处理器(){
公共无效过程(外汇兑换){
//一些code
}
})
.inOut(activemq2:队列:Q.3RD)
;
}
}
和 3rdComponent
:
私有静态类MyRouteBuilder扩展RouteBuilder {
@覆盖
公共无效配置(){
从(ActiveMQ的:队列:Q.3RD)
.threads(1,100)
.process(新处理器(){
公共无效过程(外汇兑换){
//一些code
}
})
;
}
}
更新:
我的previous答案工作正常,但没有完整的解决方案。
这个错误是的生产的非唯一 CorrelationIDs
!的(随机字符串生成一个bug)简单! ! :|
There is a middleware
in between of two other software components. In the middleware
I'm routing Apache ActiveMQ
messages by Apache Camel
.
this is how it works:
1stComponent
usesmiddleware
to send message to the3rdComponent
3rdComponent
replies the message and sends it back to the1st
(usingmiddleware
).1stComponent <<=>> Middleware <<=>> 3rdComponent
Problem:
I'm using ConcurrentConsumers
in middleware.
In the middle of sending a lot of messages sequentially, suddenly middleware
stops all the process!
there is no exceptions or messages!
for example, first 100 of 500 messages got processed and the remainders remain in the queue as pending messages.
this warning is logged sometimes in the middle of the process:
[WARN ] TemporaryQueueReplyManager(Camel (camel-1) thread #11 - TemporaryQueueReplyManager[Q.MyQ]):91 - Reply received for unknown correlationID [c551c7aa061f501c]. The message will be ignored: ActiveMQMapMessage {commandId = 2161, responseRequired = true, messageId = ID:xxxxxxx, originalDestination = null, originalTransactionId = null, producerId = ID:xxxxxxx, destination = temp-queue://ID:localhost.localdomain-40961-1389890357282-3:1:1, transactionId = null, expiration = 0, timestamp = 1389890272360, arrival = 0, brokerInTime = 1389890272360, brokerOutTime = 1389890272360, correlationId = c551c7aa061f501c, replyTo = temp-queue://ID:localhost.localdomain-40961-1389890357282-3:1:1, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@19e19da, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {breadcrumbId=ID:xxxxxxxxxxxxxx, Title=300, CamelJmsDeliveryMode=1}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {} }
this is the middlewares
Code:
private static class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activemq:queue:Q.Middleware?concurrentConsumers=1&maxConcurrentConsumers=10")
.threads(1, 100)
.process(new Processor() {
public void process(Exchange exchange) {
//some code
}
})
.inOut("activemq2:queue:Q.3RD")
;
}
}
and the 3rdComponent
:
private static class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() {
from("activemq:queue:Q.3RD")
.threads(1, 100)
.process(new Processor() {
public void process(Exchange exchange) {
//some code
}
})
;
}
}
UPDATE:
My previous answer is working correctly, but was not the complete solution.
The mistake was producing non-unique CorrelationIDs
! (a bug in random string generators) simple!!! :|
这篇关于Apache的骆驼:回复收到未知的correlationID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!