我已经使用月食霍诺连接了日食同上和连通性api。当我设置它的时候,它工作的很好。然而,经过一段时间后,转发连接失败。当我检索指标时,我会得到以下响应:
{
"?": {
"?": {
"type": "connectivity.responses:aggregatedResponse",
"status": 200,
"connectionId": "<connectionId>",
"responsesType": "connectivity.responses:retrieveConnectionMetrics",
"responses": {
"connectivity-7cc7b5dc4c-6nn59": {
"type": "connectivity.responses:retrieveConnectionMetrics",
"status": 200,
"connectionId": "<connectionId>",
"connectionMetrics": {
"connectionStatus": "open",
"connectionStatusDetails": "Connected at 2019-03-19T08:28:53.211Z",
"inConnectionStatusSince": "2019-03-19T08:28:53.211Z",
"clientState": "CONNECTED",
"sourcesMetrics": [],
"targetsMetrics": [
{
"addressMetrics": {
"gw/{{ thing:namespace }}/{{ thing:id }}": {
"status": "failed",
"statusDetails": "Producer closed at 2019-03-19T21:00:16.466Z",
"messageCount": 2048,
"lastMessageAt": "2019-03-19T21:00:05.361Z"
}
},
"publishedMessages": 4070
}
]
}
}
}
}
}
}在提到的时间里,我一直在检查日志,但是我没有发现任何错误。我在这里发布的日志是上面提到的时间戳之前的日志和第一个日志(2019-03-19T21:00:16.466Z)。
2019-03-19 21:00:11,771 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpPublisherActor akka://ditto-cluster/system/sharding/connection/7/tenant_aloxy_consumer-aloxy-forward/pa/$a/c1/amqpPublisherActor3
- Message JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@9bc051af } sent successfully.
2019-03-19 21:01:11,733 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpClientActor akka://ditto-cluster/system/sharding/connection/1/tenant_aloxy_consumer-aloxy/pa/$a/c1 - Inbound message: JmsInboundMessageDispatch { sequence = 38885, messageId = TelemetrySenderImpl-42873, consumerId = ID:a4925b59-1bb4-4cd8-9151-96ad422c36df:1:1:1 }尽管所有同上服务的日志级别都设置为调试,但我没有获得任何有用的日志记录。
你们中有谁知道如何让我去调查这个问题,或者,更好的是,对问题可能是什么,以及如何解决它有任何了解?
当我删除连接并重新创建它时,一切都按照预期的方式工作。也许可以在引擎盖下自动完成这个任务?
更新
当通过API检索连接时,我将得到以下响应(包括设置为true的failoverEnabled属性)。这也表明连接使用AMQP1.0。所使用的经纪人是集体的。
{
"?": {
"?": {
"type": "connectivity.responses:retrieveConnection",
"status": 200,
"connection": {
"id": "<connectionId>",
"name": null,
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://<consumer>:<password>@<amqp-host>:5672",
"sources": [],
"targets": [
{
"address": "gw/{{ thing:namespace }}/{{ thing:id }}",
"topics": [
"_/_/things/twin/events?filter=exists(features/alp)"
],
"authorizationContext": [
"<auth-context>"
]
}
],
"clientCount": 1,
"failoverEnabled": true,
"validateCertificates": true,
"processorPoolSize": 5,
"tags": []
}
}
}
}发布于 2019-03-20 13:14:33
如果配置为Eclipse,则Eclipse会执行自动故障转移(请参阅模型中的https://www.eclipse.org/ditto/basic-connections.html - "failoverEnabled“属性)。但是,这可能是在您使用的0.8.0版本之后得到了改进。Ditto团队目前正在开发一个0.9.0-M1版本,该版本将包含一个改进的重连接行为。
到Eclipse的连接会自动重新连接吗?您描述了“转发连接”不时失败。哪种技术(经纪人等)是那个gw/{{ thing:namespace }}/{{ thing:id }}地址的端点吗?
https://stackoverflow.com/questions/55261173
复制相似问题