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

[MODINVOSTO-187] Implement audit outbox pattern for sending kafka events about invoice updates #198

Merged
merged 22 commits into from
Nov 11, 2024

Conversation

Saba-Zedginidze-EPAM
Copy link
Contributor

@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM commented Nov 5, 2024

Purpose

[MODINVOSTO-187] Implement audit outbox pattern for sending kafka events about invoice updates
[MODINVOSTO-188] Implement audit outbox pattern for sending kafka events about invoice line updates

Approach

  • Refactor existing invoice and invoice line services and DAOs to use Conn instead of PgUtil
  • Add new tables for outbox event logs and internal locks
  • Add DAOs for logs and locks
  • Add Audit outbox service for storing updates as logs
  • Add Audit outbox producer for sending logs to kafka
  • Add new API for _timer interface to trigger producer message processing
  • Add kafka dependencies
  • Add new API test to get full coverage

Verification:

After enabling module, the new tables are created:

image
image

After creating invoice and invoice line the outbox events are stored:

image

Sending logs to kafka:

image
image
image

Integration tests:

image

@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM changed the title Modinvosto 187 [MODINVOSTO-187] Implement audit outbox pattern for sending kafka events about invoice updates Nov 5, 2024
pom.xml Outdated Show resolved Hide resolved
@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM force-pushed the MODINVOSTO-187 branch 2 times, most recently from be4b880 to a2244e6 Compare November 7, 2024 13:12
@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM force-pushed the MODINVOSTO-187 branch 3 times, most recently from 0e2486d to 73a93aa Compare November 7, 2024 14:31
@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM requested a review from a team November 7, 2024 14:44
@@ -172,6 +184,35 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

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

these 2 dependenices are exist in folio-kafka-wrapper: kafka-clients, kafka-junit
If possible we can use them from this shared library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both are necessary as kafka-junit in needed to startup embedded cluster, and without kafka-clients the tests fail to work properly with kafka

Copy link

@Saba-Zedginidze-EPAM Saba-Zedginidze-EPAM merged commit 6f949c1 into master Nov 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants