KAFKA的通知引擎发送推送通知从Android应用中的不同用户获取ID

发布于 2025-02-11 12:15:46 字数 341 浏览 1 评论 0原文

我正在设计一个通知引擎(基于打字稿),该引擎将用作单一停车商店,用于其他各种系统,以将通知发送到不同的频道(推送通知,SMS,电子邮件等)。我希望构建此系统,以使用KAFKA作为消息代理组件(也将还有许多其他组件)。

我的查询是针对应用推送通知的(我们当前的系统使用基于FCM主题的订阅通知,来自单个系统发布的通知)。新的Notification引擎将作为KAFKA生产商工作,并以定期的间隔(如本系统的调度程序组件中配置)发布消息。应用程序用户在发布后如何获得通知?我假设这里的应用必须作为Kafka消费者工作。实现这一目标的最佳方法是什么? KAFKA REST代理是移动应用程序像Kafka消费者一样的选择吗?移动应用程序可以处理所有消费者责任吗?

I am designing a Notification Engine (typescript Based) which will be used as an one stop shop for various other systems to send notification to different channels (push notifications, SMS, email etc). I wish to build this system to use Kafka as a message broker component (there will be many other components as well).

My query is specific to app push notifications (our current system uses FCM topic based subscribed notifications coming from individual systems who publish). The New Notification Engine will be working as the Kafka Producer and publish messages in regular intervals ( as configured in the Scheduler Component of this system) to the topics. How do the app user get the notifications as soon as they are published ? I am assuming the apps here have to work as Kafka Consumer. What is the best way to achieve this ? Is Kafka REST Proxy an option for the Mobile Apps to act like Kafka Consumers ? Would it be overload for mobile app to handle all the consumer responsibility ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城花音 2025-02-18 12:15:46

我不会出于两个原因将移动应用程序作为消费者成为消费者

  1. - 您需要在客户端
  2. 缩放性上保存信用 - 每个移动都将充当消费者,这将使主题的吞吐量随着用户数量的增长而增长,

我建议您编写一个新的组件,该组件会消耗来自Kafka的消息,并通过套接字数据发布给移动客户端。

查看socket.io,支持打字稿以及易于使用的库。

祝你好运!

I wouldn’t make the mobile app a consumer for 2 reasons

  1. Security - you will need to save creds at client side
  2. scaleability - every mobile would act as a consumer which will make the throughput of the topic to grow as the number of users grows

I would suggest you to write a new component that consumes that messages from kafka and publishes through socket data to the mobile clients.

Take a look at socket.io, supports typescript and also a easy to use library.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文