如何清理用于幂等 Spring 集成模式的元数据存储 | 珊瑚贝

How to cleanup the metadata store used for idempotent spring integration pattern


我在 Spring 集成流程中使用幂等接收器模式来检测重复消息。

https://docs.spring.io/spring-integration/docs/5.0.5.RELEASE/reference/html/system-management-chapter.html#metadata-store

在上面的链接中它说

The value of the idempotent entry may be some expiration date, after
which that entry should be removed from Metadata Store by some
scheduled reaper.

spring 是否提供了任何实用程序/调度程序来清理 INT_METADATA_STORE 表?


好吧,没有这样的内置工具用于 MetadaStore 清理,尽管我相信我们需要补充:这不是我们第一次收到能够删除(或expire) 商店中的一些旧条目。随意就此事提出 JIRA。看起来我们需要添加一些额外的列: UPDATE_DATE 以便能够将它与 expireUnusedOlderThan(long age) 回调中的一些时间进行比较。类似于我们使用 ExpirableLockRegistry.

的东西

既然你谈到了一个 INT_METADATA_STORE 表,我相信你可以暂时使用一个普通的 JdbcTemplate 和一些来自 Spring Framework 的计划任务:https://docs.spring.io/spring/docs/current /spring-framework-reference/integration.html#scheduling-annotation-support

  • 谢谢会提高 Jira,我将 jms_messageId 标头值存储在 METADATA_KEY 中


来源:https://www.codenong.com/51839414/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9007.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?