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

feat(events): forward the tenant configuration as part of the kafka message #5224

Merged
merged 15 commits into from
Jul 25, 2024

Conversation

Abhitator216
Copy link
Contributor

@Abhitator216 Abhitator216 commented Jul 5, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Enhance the KafkaProducer struct to include a clickhouse_db_name field. This field is needed for generating audit events that do not use KafkaStore. Additionally, we will implement a method to add tenant details within KafkaProducer and propagate this functionality through EventsHandler.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

This is to support multitenancy.

How did you test it?

After making a payment, you can observe a new field added at the end: clickhouse_database = default for [Topics] hyperswitch-payment-attempt-events for sandbox the clickhouse_database should have the hyperswitch_sandbox or the current clickhouse db in use.
image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@Abhitator216 Abhitator216 self-assigned this Jul 5, 2024
@Abhitator216 Abhitator216 requested review from a team as code owners July 5, 2024 12:28
Copy link
Member

@lsampras lsampras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share a screenshot of the Audit events as well for e.g PaymentCancel

config/development.toml Show resolved Hide resolved
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Jul 16, 2024
@Abhitator216 Abhitator216 requested a review from a team as a code owner July 23, 2024 10:30
@hyperswitch-bot hyperswitch-bot bot removed the M-database-changes Metadata: This PR involves database schema changes label Jul 23, 2024
@Abhitator216 Abhitator216 requested a review from lsampras July 23, 2024 12:53
config/development.toml Outdated Show resolved Hide resolved
@Abhitator216 Abhitator216 requested review from lsampras and tsdk02 July 24, 2024 11:18
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 25, 2024
Merged via the queue into main with commit 623cf4c Jul 25, 2024
17 checks passed
@likhinbopanna likhinbopanna deleted the adding-tenant-kafka-producer-4986 branch July 25, 2024 13:32
@SanchithHegde SanchithHegde added the M-configuration-changes Metadata: This PR involves configuration changes label Jul 25, 2024
pixincreate added a commit that referenced this pull request Jul 30, 2024
* 'main' of github.com:juspay/hyperswitch:
  refactor(router): remove `connector_account_details` and `connector_webhook_details` in merchant_connector_account list response (#5457)
  feat: add env variable for enable key manager service (#5442)
  chore(version): 2024.07.29.0
  feat(payments): support sort criteria in payments list (#5389)
  refactor(connector):  add amount conversion framework to placetopay (#4988)
  feat(connector): [Bambora APAC] add mandate flow (#5376)
  ci: set code owners for payment methods files (#5453)
  refactor(opensearch): Add Error Handling for Empty Query and Filters in Request (#5432)
  chore: address Rust 1.80 clippy lints (#5447)
  feat(connector): [FISERV] Move connector to hyperswitch_connectors (#5441)
  ci: add support for just hack_v2 check for PRs (#5426)
  fix: added created at and modified at keys in PaymentAttemptResponse (#5412)
  refactor(merchant_account_v2): recreate id for `merchant_account` v2  (#5439)
  chore(version): 2024.07.26.0
  feat(events): forward the tenant configuration as part of the kafka message (#5224)
  refactor(connector):  add amount conversion framework to payone (#4981)
  refactor(user_roles): make org and merchant id nullable (#5353)
  fix(euclid): change the address taken in SessionFlowRouting from shipping to billing address (#5435)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-configuration-changes Metadata: This PR involves configuration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(events): forward the tenant configuration as part of the kafka message
5 participants