Skip to content

Eternal Orchestrator is replaying external event infinitely  #182

@kanupriya15025

Description

@kanupriya15025

Following up on #136

@kamperiadis Now the event is read properly but in a code similar to this :

    Task<Something> event = ctx.waitForExternalEvent("Approval", Something.class);
    Task<?> timer = ctx.createTimer(Duration.ofDays(7)); 
    Task<?> winner = ctx.anyOf(event, timer).await(); 
    if (winner == event) {
        response = event.await();
        if (!ctx.getIsReplaying()) {
            context.getLogger().info("winner is the external event");
            ctx.continueAsNew(response);
            return;
        }
    }
    else {
        context.getLogger().info("winner is the timer");
    }

The log line "winner is the external event" keeps on printing infinitely. (Note that it's under a condition, so the log line is not replaying.
The event is somehow being replayed again and again with each execution.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions