You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "Daniel Qian (JIRA)" <ji...@apache.org> on 2019/07/20 13:33:00 UTC
[jira] [Comment Edited] (SCB-1386) @SagaEnd annotation
[ https://issues.apache.org/jira/browse/SCB-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889501#comment-16889501 ]
Daniel Qian edited comment on SCB-1386 at 7/20/19 1:32 PM:
-----------------------------------------------------------
So, you wanna use a @SagaEnd in service B side like below?
Service A:
{code:java}
@SagaStart
public void foo() {
// async call serviceB.bar()
}{code}
Service B:
{code:java}
@Compensable
@SagaEnd
public void bar() {
// some business logic
}{code}
If I didn't misunderstand your point, I think there is a problem: If Service A call Service B and C both asynchronously which service should the @SagaEnd resides in?
was (Author: chanjarster):
So, you wanna use a @SagaEnd in service B side like below?
Service A:
{code:java}
@SagaStart
public void foo() {
// async call serviceB.bar()
}{code}
Service B:
{code:java}
@Compensable
@SagaEnd
public void bar() {
// some business logic
}{code}
If I didn't misunderstand your point, I think there is a problem: If Service A call Service B and C both asynchronously which service should the @SagaEnd resides in?
> @SagaEnd annotation
> -------------------
>
> Key: SCB-1386
> URL: https://issues.apache.org/jira/browse/SCB-1386
> Project: Apache ServiceComb
> Issue Type: New Feature
> Components: Saga
> Affects Versions: pack-0.5.0
> Reporter: José Cardoso
> Priority: Major
>
> In an async environment (ex: microservices architecture communicating via messaging systems) it is important to control when the saga ends. Therefore, I propose a new annotation - @SagaEnd - to have the possibility to explicitly end the Saga, which will also allow the triggering of the compensation methods in case of failure.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)