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

[spike] Investigate how to implement the SAGA pattern in Quarkus

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • True
    • subs-swatch

      At the moment, Quarkus does not support chain transactions between Smallrye Messaging Kafka and Hibernate ORM. An issue has been reported to track it in https://github.com/quarkusio/quarkus/issues/40530 and in the Smallrye repo as well here.

      Being practical, the limitation is raised when:
      1. listen message from topic A
      2. update database
      3. send message to another topic B

      Each of the above three steps require and start a transaction, so when the step 2 fails, then the message from step 1 is nack and all is rolled back.
      In Spring, this works fine since the transaction of the above three steps are chained, but not in Quarkus.

      Since we're porting all our services from Spring to Quarkus, we need to investigate how to implement the SAGA pattern to handle the above scenario.

      Useful links

      Acceptance Criteria

      • Proof of concept about how to implement the SAGA pattern in a Quarkus service that requires a Kafka and a Database transaction.
      • Check whether there is an existing framework/tool in the community to do this.
      • Compare the solution with what we do nowadays to handle the billable usage workflow.
      • A description of how this would work for billable usage to swatch-producer-<marketplace> interactions
      • evaluation & discussion of whether choreography or orchestration based pattern would be more appropriate for SWATCH
      • How to trace/debug a saga that has gone wrong
      • Demo / Dev-Review

              awood1@redhat.com Alex Wood
              jcarvaja@redhat.com Jose Carvajal Hilario
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: