Skip to content

add DCB event scheduler - #441

Merged
MGathier merged 3 commits into
masterfrom
feature/dcb-event-scheduler
Sep 5, 2025
Merged

MGathier merged 3 commits into
masterfrom
feature/dcb-event-scheduler

Conversation

@MGathier

Copy link
Copy Markdown
Contributor

No description provided.

@MGathier
MGathier requested review from m1l4n54v1c and smcvb August 26, 2025 12:43
@MGathier MGathier self-assigned this Aug 26, 2025
@MGathier
MGathier requested a review from trimoq as a code owner August 26, 2025 12:43

@trimoq trimoq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just one small thing, other than that, it looks good

public CompletableFuture<String> scheduleEvent(Instant scheduleTime, Event event) {
FutureStreamObserver<ScheduleToken>responseObserver = new FutureStreamObserver<>(new AxonServerException(
ErrorCategory.OTHER,
"An unknown error occurred while scheduling an Event. No response received from Server.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we receive no reponse from the server, would INSTRUCTION_ACK_ERROR be a sensible choice or is that intended for something else?

@smcvb smcvb Sep 1, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't some event scheduling error category make sense? OTHER seems awfully generic for something that can be pinpointed a bit better.


/**
* Reschedules the scheduled event with the given {@code scheduleToken} and reschedule it
* to be published after given {@code triggerDuration}. If no event is provided, the original event will be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: We can clarify the fact we are not requiring an Event by using @NonNull and @Nullable annotations on the parameters.


eventScheduler.rescheduleEvent(RescheduleEventRequest.newBuilder()
.setToken(scheduleToken)
.setEvent(event)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess the RescheduleEventRequest is okay with null Event inputs?

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I trust in your judgment that this change is valid.

@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2025

Copy link
Copy Markdown

@MGathier
MGathier merged commit 442848f into master Sep 5, 2025
@MGathier
MGathier deleted the feature/dcb-event-scheduler branch September 5, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants