Cloud Pub / Sub和Cloud Dataflow将工作人员修复为主题

时间:2022-11-20 19:17:31

I have a Google Cloud Pub/Sub and Cloud Dataflow stream processing architecture, i need guaranteed message ordering. Is it possible to set the subscription message flow so that the dataflow workers are fixed per topic, so the messages are routed through the same dataflow worker and therefore should achieve message ordering.

我有一个Google Cloud Pub / Sub和Cloud Dataflow流处理架构,我需要保证消息排序。是否可以设置订阅消息流,以便每个主题固定数据流工作者,因此消息通过相同的数据流工作程序路由,因此应实现消息排序。

Thanks

谢谢

1 个解决方案

#1


0  

When you say you need guaranteed message ordering, do you mean: 1. Order in the final result matters in this case you can you could attach a timestamp to every event in the publisher and make the subscriber store the messages in some underlying data store. 2. Order of processed messages matters in this case you should do the same plus have a subscriber check the persistent storage to know the next message it must process.

当您说您需要有保证的消息排序时,您的意思是:1。在最终结果中排序很重要在这种情况下,您可以将时间戳附加到发布者中的每个事件,并使订阅者将消息存储在某个底层数据存储中。 2.已处理消息的顺序在这种情况下很重要,您应该这样做,并让订户检查持久存储以了解它必须处理的下一条消息。

You can read more on this in this link .

您可以在此链接中阅读更多相关信息。

#1


0  

When you say you need guaranteed message ordering, do you mean: 1. Order in the final result matters in this case you can you could attach a timestamp to every event in the publisher and make the subscriber store the messages in some underlying data store. 2. Order of processed messages matters in this case you should do the same plus have a subscriber check the persistent storage to know the next message it must process.

当您说您需要有保证的消息排序时,您的意思是:1。在最终结果中排序很重要在这种情况下,您可以将时间戳附加到发布者中的每个事件,并使订阅者将消息存储在某个底层数据存储中。 2.已处理消息的顺序在这种情况下很重要,您应该这样做,并让订户检查持久存储以了解它必须处理的下一条消息。

You can read more on this in this link .

您可以在此链接中阅读更多相关信息。