Comments (4)
https://help.aliyun.com/document_detail/59998.html?spm=5176.doc49319.6.609.3GoMgx
这里有关于Kafka分区顺序的说明
from aliware-kafka-demos.
分区顺序
单个分区内,消息是按照发送顺序储存的,是基本有序的。 但云上 Kafka 并不保证单个分区内绝对有序,所以在某些情况下,会发生少量消息乱序,比如: 云上 Kafka 为了提高可用性,某个分区挂掉后把消息 failover 到其它分区。
from aliware-kafka-demos.
你是什么业务场景呢,需要使用分区顺序?
from aliware-kafka-demos.
好像这里指的分区跟我所理解的分区不一样。
比如这里提到的:https://help.aliyun.com/document_detail/49319.html?spm=5176.doc29537.6.566.xBDPnV
MQ 分区顺序消息适用于如下场景:
性能要求高,以 sharding key 作为分区字段,在同一个区块中严格的按照 FIFO 原则进行消息发布和消费的场景。
举例说明:
【例一】用户注册需要发送发验证码,以用户 ID 作为 sharding key, 那么同一个用户发送的消息都会按照先后顺序来发布和订阅。
【例二】电商的订单创建,以订单 ID 作为 sharding key,那么同一个订单相关的创建订单消息、订单支付消息、订单退款消息、订单物流消息都会按照先后顺序来发布和订阅。
阿里巴巴集团内部电商系统均使用此种分区顺序消息,既保证业务的顺序,同时又能保证业务的高性能。
最近用到消息队列,之前用redis做消息队列,目前qps达到2万多,感觉出现了瓶颈。
去阿里云看消息队列的相关产品,发现有nodejs的SDK的,就只有Kafka了。所以目前了解一下Kafka。但是出现了不少疑问。
我的应用场景是这样的。
有多个任务,每个任务都有队列
任务A,可能有200万队列
任务B,可能有1万队列
任务C,可能有15万队列
不是按顺序消费的。比如根据一定的条件,优先消费任务C,也有可能优先消费任务B,所以,这时候,这些队列最好能分组存储,按分组消费。我看见阿里云的后台,每次生产一个消息,都可以添加tag,但是我又不知道怎么根据tag去查询这些消息。
还有一种情况,当用户取消了任务B,要有一定的清理机制,最好能让我直接把某个tag下面的任务队列全清除了。
from aliware-kafka-demos.
Related Issues (20)
- 求erlang demo
- node kafka连接后一直报错
- Plz support PHP
- pykafka 生产消息时报UnknownError
- filebeat demo 配置在商业版 kafka 会出错 connection reset by peer HOT 1
- springboot 2.0不兼容 HOT 6
- 关于Spring Cloud Stream Kafka Demo的配置问题 HOT 1
- logstash 配置sasl_mechanism ONS 传输失效
- 没有spring boot demo HOT 1
- php在调用producer发送消息时如何设置不需要等待进程结束 HOT 1
- 在升级或者宕机时,会发生少量消息乱序(某个分区挂掉后把消息 Failover 到其它分区)是怎么实现的? HOT 3
- 为啥没有.net的直接sdk,如果歧视.net就别给我发邮件了 HOT 1
- Go README需要更新了
- confluent-kafka-dotnet 也是兼容阿里云 kafkamq的是吗
- go confluent客户端 跨平台编译报错 HOT 1
- 使用docker起go sdk的一个producer,返回证书验证失败的错误 HOT 1
- confluent-kafka-go 在1.7.0之后已经支持windows,不能提供个完整demo吗?
- Cpp VPC-SSL demo 一直报SSL错误 HOT 3
- 报错:java: 无法访问java.time.Duration 找不到java.time.Duration的类文件 HOT 1
- kafka-nodejs-demo ssl报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aliware-kafka-demos.