Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add tenant-ID as a field to all KafkaStore events #4595

Closed
lsampras opened this issue May 8, 2024 · 1 comment · Fixed by #4598
Closed

[Feature] Add tenant-ID as a field to all KafkaStore events #4595

lsampras opened this issue May 8, 2024 · 1 comment · Fixed by #4598
Assignees
Labels
A-Analytics C-feature Category: Feature request or enhancement good first issue Good for newcomers

Comments

@lsampras
Copy link
Member

lsampras commented May 8, 2024

Context

In-order to support multi-tenancy we need to store data partioned via tenant-id.
In order to do that for kafka events we need to pass tenant-id as a field in the generated kafka events

We can use the KafkaStore field added in #4512 to add them to events in Kafka

Approach

  1. Add a new field in KafkaEvent struct representing tenant_id
#[derive(serde::Serialize, Debug)]
struct KafkaEvent<'a, T: KafkaMessage> {
    #[serde(flatten)]
    event: &'a T,
    sign_flag: i32,
    tenant_id: TenantID
}

Alternate approaches can be discussed in the issue

@subhajit20
Copy link
Contributor

hey @lsampras I am taking this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analytics C-feature Category: Feature request or enhancement good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants