---
title: "Kafka常见问题"
author: "fairy_xzc"
date: "2019-03-13T14:46:03Z"
tags: []
categories: ["编程语言"]
slug: "kafka"
draft: false
lastmod: "2019-03-13T14:46:40Z"
id: 2438826
url: "https://agilestyle.iteye.com/blog/2438826"
---

原创转载请注明出处：[https://agilestyle.iteye.com/blog/2438826](/blog/2438826)

 

**同一个方法里面，先sendKafkaMsg1，后sendKafkaMsg2，能保证有序么？**

如果key相同，send到同一个partition是有序的，先msg1，后msg2

如果key不相同，send到不同的partition，不一定有序