我有一个入站的RabbitMQ通道适配器,每天成功处理3000条消息,但偶尔我会在RabbitMQ管理控制台中看到未分组的消息计数为1。这似乎仍然是这样。
我确实有一个重试建议链重试3次,然后通过死信路由密钥转移到DLQ,这对大多数例外情况都有效。
在过去的几周内,unacked已经发生了两次,并且在其中一次我能够进行线程转储并看到int-http:outbound-gateway调用卡在等待http响应getStatusCode()
我有一个接收超时=" 59000"在int-amqp:inbound-channel-adapter,我希望它会在超过超时的任何地方超时?
我现在注意到int-http:outbound-gateway上有一个reply-timeout属性我应该设置吗?
任何想法都赞赏?
<int-amqp:inbound-channel-adapter id="amqpInCdbEvents" channel="eventsAMQPChannel" channel-transacted="true" transaction-manager="transactionManager"
queue-names="internal.events.queue" connection-factory="connectionFactory"
receive-timeout="59000" concurrent-consumers="${eventsAMQPChannel.concurrent-consumers}"
advice-chain="retryChain" auto-startup="false" />
<int:channel id="eventsAMQPChannel" />
<!-- CHAIN of processing for Asynch Processing of Events from intermediate Queue -->
<int:chain id="routeEventChain" input-channel="eventsAMQPChannel">
<int:json-to-object-transformer type="xx.xx.xx.json.Event" object-mapper="springJacksonObjectMapper"/>
<int:header-enricher>
<int:header name="originalPayload" expression="payload" overwrite="true"/>
<int:header name="message_id" expression="payload.id" overwrite="true"/>
</int:header-enricher>
<int:router expression="payload.eventType">
<int:mapping value="VALUE" channel="valueEventChannel"/>
<int:mapping value="SWAP" channel="swapEventChannel"/>
</int:router>
</int:chain>
<int:channel id="valueEventChannel" />
<int:channel id="swapEventChannel" />
<int:chain id="valueEventChain" input-channel="valueEventChannel" output-channel="nullChannel">
<int:transformer ref="syncValuationTransformer" />
<int:object-to-json-transformer object-mapper="springJacksonObjectMapper" />
<int:header-enricher>
<int:header name="contentType" value="application/json;charset=UTF-8" overwrite="true"/>
</int:header-enricher>
<int-http:outbound-gateway id="httpOutboundGatewayValuationServiceFinalValuation"
expected-response-type="java.lang.String"
http-method="POST" charset="UTF-8"
extract-request-payload="true"
url="${value.service.uri}/value"/>
</int:chain>
答案 0 :(得分:0)
:e $MYVIMRC
:source $MYVIMRC
是超时(如果它可以阻止 - 例如有限的队列频道已满)。
int-http:outbound-gateway调用卡在等待http响应getStatusCode()
您可以在reply-timeout
上设置客户端超时(readtimeout
),并将其配置到出站适配器中...
ClientHttpRequestFactory