Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3114

Spike: Design solution to kafka and database transaction issue

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False

      We have several places in our code where we need to write to the database and then send a kafka message in a single transaction. This isn't currently handled in quarkus so when one operation fails the other may still succeed, resulting in a mismatch between the database and kafka.

      One such scenario is where we create a billable_usage_remittance record and send a billable-usage kafka message in the same transaction. 

      To handle this we can implement the transactional outbox pattern: https://microservices.io/patterns/data/transactional-outbox.html

       

      Things to address:

      Done:

      • Design document created and reviewed with team
      • Stories created

              Unassigned Unassigned
              kflahert@redhat.com Kevin Flaherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: