Package io.namastack.springoutbox
Class OutboxCoreAutoConfiguration
-
- All Implemented Interfaces:
@AutoConfiguration()@AutoConfigurationPackage()@ConditionalOnBean(annotation = {EnableOutbox.class})@EnableConfigurationProperties(value = {OutboxProperties.class}) public final class OutboxCoreAutoConfigurationAuto-configuration class for Spring Outbox core functionality.
This configuration is activated when the @EnableOutbox annotation is present and provides all necessary beans for the outbox pattern implementation.
- Since:
0.1.0
Roland Beisel
-
-
Constructor Summary
Constructors Constructor Description OutboxCoreAutoConfiguration()
-
Method Summary
Modifier and Type Method Description final Clockclock()Provides a default Clock bean if none is configured. final OutboxRetryPolicyretryPolicy(OutboxProperties properties)Creates a retry policy based on configuration properties. final OutboxLockManageroutboxLockManager(OutboxLockRepository lockRepository, OutboxProperties properties, Clock clock)Creates the outbox lock manager when a lock repository is available. final OutboxProcessingScheduleroutboxScheduler(OutboxRecordRepository recordRepository, OutboxRecordProcessor recordProcessor, OutboxLockManager lockManager, OutboxRetryPolicy retryPolicy, OutboxProperties properties, Clock clock)Creates the outbox processing scheduler when required dependencies are available. -
-
Method Detail
-
clock
@Bean()@ConditionalOnMissingBean() final Clock clock()
Provides a default Clock bean if none is configured.
- Returns:
System default zone clock
-
retryPolicy
@Bean()@ConditionalOnMissingBean() final OutboxRetryPolicy retryPolicy(OutboxProperties properties)
Creates a retry policy based on configuration properties.
- Parameters:
properties- Outbox configuration properties- Returns:
Configured retry policy
-
outboxLockManager
@Bean()@ConditionalOnBean(value = {OutboxLockRepository.class}) final OutboxLockManager outboxLockManager(OutboxLockRepository lockRepository, OutboxProperties properties, Clock clock)Creates the outbox lock manager when a lock repository is available.
- Parameters:
lockRepository- Repository for managing locksproperties- Outbox configuration propertiesclock- Clock for time-based operations- Returns:
Configured outbox lock manager
-
outboxScheduler
@Bean()@ConditionalOnBean(value = {OutboxRecordRepository.class}) final OutboxProcessingScheduler outboxScheduler(OutboxRecordRepository recordRepository, OutboxRecordProcessor recordProcessor, OutboxLockManager lockManager, OutboxRetryPolicy retryPolicy, OutboxProperties properties, Clock clock)Creates the outbox processing scheduler when required dependencies are available.
- Parameters:
recordRepository- Repository for outbox recordsrecordProcessor- Processor for handling recordslockManager- Manager for acquiring locksretryPolicy- Policy for retry behaviorproperties- Configuration propertiesclock- Clock for time-based operations- Returns:
Configured outbox processing scheduler
-
-
-
-