admin管理员组文章数量:1335447
I'm currently implementing a process for receiving MQTT frames and then exporting them to another MQTT broker. Except that the broker in question is sometimes not accessible. It is therefore important for me to manage my errors when sending this frame.
Here's the current flow I've put in place :
@Bean
public IntegrationFlow telemetryFlow() {
return IntegrationFlow
.from(broadcastChannel)
.handle(thingsBoardPubMqttHandler)
.get();
}
I've tried to set up a parallel flow to this one with the default error channel as from. But when I take the exception, it is never called with the exception :
@Bean
public IntegrationFlow errorFlow() {
return IntegrationFlow.from(errorChannel())
.log(LoggingHandler.Level.ERROR)
.get();
}
Here is my current spring integration configuration
spring.integration.channels.autoCreate=true
spring.integration.channels.error.requireSubscribers=true
spring.integration.taskScheduler.poolSize=10
spring.integration.readOnly.headers=
spring.integration.channels.maxUnicastSubscribers=2147483647
spring.integration.endpoints.noAutoStartup=
spring.integration.channels.error.ignoreFailures=false
spring.integration.messagingTemplate.throwExceptionOnLateReply=false
spring.integration.channels.maxBroadcastSubscribers=2147483647
spring.integration.endpoints.defaultTimeout=30000
Thank you in advance for your feedback
本文标签:
版权声明:本文标题:spring - How do I catch exceptions from my MqttPahoMessageHandler to perform recovery or timeout processing? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742378337a2463612.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论