简体   繁体   English

如何将死信消息路由回原始主题?

[英]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:你有几个选择:

  • Use a Dataflow pipeline to move messages from dead letter topic to your topic.使用数据流管道将消息从死信主题移动到您的主题。
  • Update existing pipeline to read from both original topic and dead letter topic based on configuration更新现有管道以根据配置从原始主题和死信主题中读取
  • Create a new system that, when enabled, moves messages from one topic to another.创建一个新系统,启用后,将消息从一个主题移动到另一个主题。

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.

相关问题 如何创建管道以读取主题和死信并等待系统恢复以插入回消息 - How to create a pipeline to read from both topic and dead letter and wait until the system is recovered to insert back the messages 谷歌云发布/订阅 - 订阅者未将消息转发到死信主题 - Google cloud Pub/Sub - subscriber not forwarding messages to dead letter topic PubSub 最大传递尝试次数和死信主题 - PubSub Maximum delivery attempts & Dead letter topic 如何通过转发到死信主题来限制 Google Pub/Sub 交付尝试? - How to limit Google Pub/Sub delivery attempts by forwarding to a dead-letter topic? GCP - 如何添加关于发送到 pubsub 死信队列的消息数量的警报? - GCP - how to add alert on number of messages sent to a pubsub dead letter queue? GCP PubSub 未投递消息和死信消息之间的区别 - GCP PubSub difference between undelivered messages and dead letter messages Google PubSub 将消息订购到死信队列流程 - Google PubSub ordered Messages to Dead Letter Queue process Google Cloud Functions 无法使用 Pub/Sub 死信主题 - Google Cloud Functions can't use Pub/Sub dead-letter topic 如何使用 Terraform 配置 GCP 发布/订阅死信 - How to configure GCP pub/sub dead letter with Terraform 如何使用 pubsub 在死信订阅中自动分配发布者角色和订阅者角色? - How to automatically assign a publisher role and subscriber role on dead letter subscription with pubsub?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM