---
title: "Kafka’s Key Property Which Tells Interact of Consumers"
description: "Data sharing among Kafka consumers is possible with this property. The consumer properties set-up indicates this, and it is also an interview question."
url: https://srinimf.com/2022/07/17/kafkas-key-property-which-tells-interact-of-consumers/
date: 2022-07-17
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2022/07/pexels-photo-4990534.jpeg?fit=1880%2C1253&ssl=1
categories: ["Kafka"]
tags: ["Kafka consumer group-id"]
type: post
lang: en
---

# Kafka’s Key Property Which Tells Interact of Consumers

Kafka’s architecture supports a broker for producers and consumers. The producers can be any production data, and the consumers can be data analysis systems or tools.

Related[9 Kafka Interview Questions for Experienced Professionals](https://srinimf.com/2021/07/12/9-kafka-advanced-interview-questions/)

## How Consumers share data in Kafka

The question you may face in interviews is [how to](https://srinimf.com/2015/05/22/1-more-addition-of-global-variables-in-db2-v11/) say which consumers participated in sharing the data.

Related[11 Kafka Admin Interview Questions](https://srinimf.com/2021/03/27/11-kafka-admin-interview-questions/)

[Consumers are receivers of data, and producers are senders of](https://www.biganalytics.me/2022/07/messages-in-kafka-types-and-details.html)data to Kafka as input. So the output is the consumption by consumers.

**Here’s Kafka’s basic architecture. **

![Here's Kafka basic architecture. ](https://i0.wp.com/srinimf.com/wp-content/uploads/2022/07/kafka.png?resize=431%2C261&ssl=1)*Here’s Kafka’s basic architecture.*

## Consumer properties

The **group-id plays a key role.** When you group all the consumers under the same group, then the consumers can share the data.

```
Properties kaProperties = new Properties();
kaProperties.put("group.id", "kinaction_team0group");
```

## Use cases

Let’s think of two use cases for data that come from a human resource system. One team wonders about the number of hires from specific states, and the other team is more interested in the data for the impact on travel budgets for interviews.

Would anyone on the first team care about what the other team is doing or would either of the teams want to consume only a portion of the messages? Likely not! How can we keep this separation? The answer is to assign a separate `group.id` to each application.

Each consumer that uses the same `group.id` as another consumer will be considered to be working together to consume the **[partitions](https://developer.confluent.io/learn-kafka/apache-kafka/partitions/#)**and **offsets **of the topic as one logical application.

Related

- [11 Kafka Admin Interview Questions](https://srinimf.com/2021/03/27/11-kafka-admin-interview-questions/)DateMarch 27, 2021
- [9 Kafka Interview Questions for Experienced Professionals](https://srinimf.com/2021/07/12/9-kafka-advanced-interview-questions/)DateJuly 12, 2021
- [Step-by-Step Guide for AWS Kafka and Kinesis Integration](https://srinimf.com/2025/01/06/step-by-step-guide-for-aws-kafka-and-kinesis-integration/)DateJanuary 6, 2025

**References**

- Confluent Certified Developer for Apache Kafka tests

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2022%2F07%2F17%2Fkafkas-key-property-which-tells-interact-of-consumers%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2022%2F07%2Fpexels-photo-4990534.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=Kafka%27s%20Key%20Property%20Which%20Tells%20Interact%20of%20Consumers)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2022/07/17/kafkas-key-property-which-tells-interact-of-consumers/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2022/07/17/kafkas-key-property-which-tells-interact-of-consumers/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2022/07/17/kafkas-key-property-which-tells-interact-of-consumers/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2022/07/17/kafkas-key-property-which-tells-interact-of-consumers/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Kafka%27s%20Key%20Property%20Which%20Tells%20Interact%20of%20Consumers&body=https%3A%2F%2Fsrinimf.com%2F2022%2F07%2F17%2Fkafkas-key-property-which-tells-interact-of-consumers%2F&share=email)
-

### Like this:

Like Loading…