Skip to content

SchedulerName Configuration for Multi-Instance Environments #740

@dogaanismail

Description

@dogaanismail

Hello,

We are integrating db-scheduler into our Spring Boot application and plan to run multiple instances of it in production. We want to ensure that all instances work together as a single logical scheduler, picking up tasks from the same database table.

We have a question about the best practice for configuring the SchedulerName in a DbSchedulerCustomizer for this multi-instance scenario.

  1. Using a fixed, static name for all instances:

@Override public Optional<SchedulerName> schedulerName() { return Optional.of(new SchedulerName.Fixed("my-application-scheduler")); }

  1. Using a dynamically generated, unique name for each instance:
    @Override public Optional<SchedulerName> schedulerName() { return Optional.of(new SchedulerName.Fixed("my-application-scheduler-" + UUID.randomUUID())); }

We would appreciate any clarification on the intended configuration for a clustered environment.

Thank you for the great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions