当前位置:网站首页>关于用户消息的推送
关于用户消息的推送
2022-06-09 06:40:00 【唐伯虎点蚊香dw】
遇到一个面试题:需要向所有用户推送一个活动消息,比如618大促,每个用户收到消息后进行展示 ,一般是右上角的铃铛显示未读消息。
这种场景一般情况下回选择使用kafka来进行消息推送,如果有千万个用户,那么为每个用户推送一条消息,或者是一条消息,为每个用户绑定一个关系表,用户读取后,消息提示消息,这种情况下,推送一条消息就会生成千万条数据,有没有更好的方法呢。
可以利用kafka的offset思想,每个用户保存一个offset,通过offset来进行消息的消费读取,这样kafka只存在一条消息,但是每个用户都可以读到,并且每个用户可以通过自己的offset来判断是否已消费。
边栏推荐
- Do you really understand entropy (including cross entropy)
- [raspberry pie 4B deep learning garbage classification] Chap.3 raspberry pie installs opencv and tests the garbage classification of the real-time video stream of the video interface [deep learning mo
- Novice, I bought a financial product before. How do you see the income?
- Mendeley and other document management tools to insert references in word
- error: subprocess-exited-with-error(fasttext)
- 若依 思维导图
- RuntimeError: Dataset not found or corrupted. You can use download=True to download it
- Performance comparison of raspberry pie Jetson nano k210 openmv
- Comparison between hummingbird e203 hardware rv-star and nucleus ddr200t and MCU 200t
- UML Series (27) Architecture Modeling - Deployment
猜你喜欢

CodeBlocks project window management

Excl two column data comparison is realized by VBA, for example, whether the data of column a has appeared in column B

Performance comparison of raspberry pie Jetson nano k210 openmv

Comparison between hummingbird e203 hardware rv-star and nucleus ddr200t and MCU 200t

Binary tree

DS_Store在文件夹下自动生成的文件,怎么解决?

Quanzhi v3s learning record (11) audio and video Usage Summary

Mendeley and other document management tools to insert references in word

Qt--- create dialog box 1: implementation of the subclass search keyword dialog box of qdialog

UML系列文章(24)高级行为---时间和空间
随机推荐
[raspberry pie 4B deep learning garbage classification] Chap.1 configure the raspberry pie with keras+tensorflow [deep learning moves]
BSP tailoring of Quanzhi platform (3) Appendix II: description of kernel hacking configuration
No cache installation instructions
Wechat applet mind map
YOLOv4解析 | 第二篇:用YOLOv4训练自己的数据集(超级详细完整版)
新手,之前买了个理财产品,怎么看收益啊?
MySQL password is correct but cannot log in
指数移动加权平均
MySQL version 8.0.28 installation and configuration method graphic tutorial
CodeBlocks always repeat the last result
QT---创建对话框1:QDialog的子类查找关键字对话框的实现
Etc. sudo permission configuration
UML系列文章(26)体系结构建模---制品
Sqlserver imports and exports data. There is a process in the background and no display in the foreground.
Qt控制台工程显示Label小窗口
Mockito no return value method and exception mock
Chapter_ 04 image operation
UML系列文章(20)基本行为---活动图
UML系列文章(25)高级行为---状态图
不懂数学可以使用机器学习编程吗?