简体   繁体   English

哪些代理为崩溃的客户端支持对子发布丢失消息的内置恢复?

[英]What brokers supports built-in recovery of sub-pub missed messages for crashed clients?

In an event-sourcing scenario, a crashed event-consumer client should got all missed events-messages published by the source while it was down. 在事件源场景中,崩溃的事件消费者客户端应在源停机时让源发布所有丢失的事件消息。

The recovery algorithm (assuming it is right) would be: 恢复算法(假设是正确的)将是:

  1. subscribe to the event source (connection 1) 订阅事件源(连接1)

  2. request the server (connection 2) all the missed messages ("missed-pack") since a given timestamp (just before the crash); 请求服务器(连接2)自给定时间戳(在崩溃之前)以来的所有丢失消息(“ miss-pack”); and apply missed events locally 并在本地应用错过的事件

  3. start reading messages from the subscription connection, applying those with timestamp greater than the last one applied from the missed-pack. 开始从订阅连接中读取消息,应用时间戳大于错过包中最后一个时间戳的消息。 (Here, we are assuming that all messages published between the subscription and the first read, will be delivered to the client. Maybe, some of the first messages read would be the last ones in the missed-pack, hence the caution). (这里,我们假设在订阅和第一次读取之间发布的所有消息都将传递给客户端。也许,读取的某些第一条消息将是错过包装中的最后一条消息,因此请谨慎。)

What brokers (message brokers, no-sql databases, ...) do support programming this recovery process "out of out the box", ie not having to program at the server (event source) side. 哪些代理(消息代理,no-sql数据库等)确实支持“开箱即用”地对该恢复过程进行编程 ,即不必在服务器(事件源)端进行编程。

Thanks. 谢谢。

Maybe what you are looking for is for a "catch up subscription" capability. 也许您正在寻找的是“赶超订阅”功能。 It is fully suported by Get Event Store . Get Event Store完全支持它。 But this is actually a database, but has excelent topic based pub/sub features, with an http API also. 但这实际上是一个数据库,但是具有基于主题的出色发布/订阅功能,并且还带有http API。

What you might not know yet is that you can do that by yourself, just make a consumer driven subscription, where the consumer knows the last checkpoint (never a timestamp, which can led to nasty concurrency problems) that where successfuly processed, not the producer. 您可能还不知道的是,您可以自己完成操作,只需进行消费者驱动的订阅,消费者就可以知道成功处理而不是生产者处理的最后一个检查点(从来没有时间戳,这可能导致讨厌的并发问题)。 。 So the client can always resume where it left. 因此,客户可以随时从其离开的地方继续。

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM