跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 请问一下,多节点消费 kafka 如何做到串行消费

发表于
就是有个场景,有个任务要处理,任务必须串行执行
为了保证任务下发后不丢失
打算借助 kafka 的持久化,把任务丢到 kafka 中
后台服务有多个节点,也就是多个节点在消费 kafka
怎么样才能做到串行消费 kafka 的消息呢?
就是说,多个节点排队消费,第一个节点拿到消息后,如果没处理完,其他节点不能继续消费
搞了好久都没实现
又不想用数据库存储然后定时读取的方式(这种方式肯定没问题)
想通过这个功能,学会 kakfa 的使用
请假一下各位大佬,基于 kafka 能不能实现这个想法呢?谢谢

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.