[英]How to route dead letter messages back to the original topic?
I have a Google Cloud Pub/Sub subscription that is using a dead-letter topic.我有一个使用死信主题的 Google Cloud Pub/Sub 订阅。 I recently had an outage that was preventing a number of messages from being processed & they ended up in the dead-letter topic.
我最近发生了一次中断,导致许多消息无法处理,它们最终出现在死信主题中。
The outage was resolved and I'd like to easily send the contents of dead letter subscription back to the original subscription.中断已解决,我想轻松地将死信订阅的内容发送回原始订阅。 They're all present in the queue still (I have nothing consuming the dead letter sub) so I just need to route them somewhere.
它们都还在队列中(我没有消耗死信子),所以我只需要将它们路由到某个地方。
This is an admin task so I'd like it to be manually initiated, if that makes any difference.这是一项管理任务,因此我希望手动启动它,如果这有什么不同的话。 Ideally via the UI but I can't see anything there.
理想情况下是通过 UI,但我在那里看不到任何东西。
You have a few options:你有几个选择:
The right answer might depend on your system design and requirements.正确答案可能取决于您的系统设计和要求。
In case your use case for dead letter topic always includes moving the messages back to the primary topic after a delay, you might want to use configurable exponential backoff in Cloud Pub/Sub.如果您的死信主题用例总是包括在延迟后将消息移回主主题,您可能希望在 Cloud Pub/Sub 中使用可配置的指数退避。 This feature will have general availability towards the end of Q2 2020.
此功能将在 2020 年第二季度末全面推出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.