# evidence 258 — messaging-reliability-and-admin-reachability
# revision: a24ece9cf797f7ea647e33bf846b115208ed1ba5
# cwd: /shared/codebase/clean-architecture-backend-template/src/messaging
# command: bash /tmp/reach3.sh
# ---- raw output ----
NAME                               mainF  testF 
OutboxRelay                        2      2     
OutboxRelayWorker                  2      1     
OutboxRetryScheduler               3      3     
OutboxCleanupJob                   1      1     
OutboxEnvelopeFactory              2      5     
JdbcOutboxRepository               0      2     
DebeziumOutboxEventRouter          1      2     
DebeziumOutboxRecordMapper         0      1     
JdbcAdminOperationJournal          1      2     
IdempotentConsumer                 3      3     
InboxCleanupJob                    1      1     
InboxRetentionPolicy               2      1     
JdbcInboxRepository                0      2     
TransactionalInboxHandler          1      0     
ClaimCheckIntegrityGuard           1      2     
ClaimCheckPolicy                   1      2     
ClaimCheckPublisher                0      1     
ClaimCheckResolver                 0      1     
ClaimCheckStore                    2      1     
AdminOperationJournal              5      1     
ApprovalVerifier                   2      0     
HmacApprovalVerifier               0      4     
DestructiveOperationGuard          3      2     
PlanDigest                         10     6     
TopologyManifest                   5      4     
TopologyValidator                  1      2     
CompositeTopologyValidator         2      1     
BrokerTopologyInspector            3      1     
DefaultMessagingAdminService       0      0     
DestructiveMessagingAdmin          2      0     
InMemoryAdminOperationJournal      1      2     
RedriveService                     2      1     
ReplayService                      1      0     
TopologyValidationRuntime          0      1     
MessagingAdminService              2      0     

==== zero main reference ====
  JdbcOutboxRepository
  DebeziumOutboxRecordMapper
  JdbcInboxRepository
  ClaimCheckPublisher
  ClaimCheckResolver
  HmacApprovalVerifier
  DefaultMessagingAdminService
  TopologyValidationRuntime

==== starter wiring of reliability + admin ====
4:import dev.caskeleton.messaging.inbox.IdempotentConsumer;
5:import dev.caskeleton.messaging.inbox.InboxCleanupJob;
6:import dev.caskeleton.messaging.inbox.InboxRetentionPolicy;
7:import dev.caskeleton.messaging.inbox.TransactionalInboxHandler;
8:import dev.caskeleton.messaging.outbox.OutboxCleanupJob;
9:import dev.caskeleton.messaging.outbox.OutboxEnvelopeFactory;
10:import dev.caskeleton.messaging.outbox.OutboxProperties;
11:import dev.caskeleton.messaging.outbox.OutboxRelay;
12:import dev.caskeleton.messaging.outbox.OutboxRelayWorker;
13:import dev.caskeleton.messaging.outbox.OutboxRetryScheduler;
14:import dev.caskeleton.messaging.reliability.InboxRepository;
15:import dev.caskeleton.messaging.reliability.OutboxRepository;
50:  public OutboxProperties outboxProperties() {
51:    return OutboxProperties.defaults();
62:  public OutboxRetryScheduler outboxRetryScheduler(OutboxProperties properties) {
63:    return new OutboxRetryScheduler(properties, Duration.ofMinutes(1));
81:  @ConditionalOnBean({OutboxRepository.class, OutboxEnvelopeFactory.class})
83:  public OutboxRelay outboxRelay(
84:      OutboxRepository outbox,
86:      OutboxEnvelopeFactory envelopes,
87:      OutboxProperties properties,
88:      OutboxRetryScheduler scheduler) {
89:    return new OutboxRelay(
106:  @ConditionalOnBean(OutboxRelay.class)
108:  public OutboxRelayWorker outboxRelayWorker(OutboxRelay relay, OutboxRetryScheduler scheduler) {
109:    return new OutboxRelayWorker(relay, scheduler);
123:  @ConditionalOnBean(OutboxRelayWorker.class)
125:  public MessagingOutboxRelayLifecycle outboxRelayLifecycle(
126:      OutboxRelayWorker worker, OutboxProperties properties) {
127:    return new MessagingOutboxRelayLifecycle(worker, properties.leaseDuration());
138:  @ConditionalOnBean(OutboxRepository.class)
140:  public OutboxCleanupJob outboxCleanupJob(OutboxRepository outbox, OutboxProperties properties) {
141:    return new OutboxCleanupJob(outbox, properties, 20);
155:  public InboxRetentionPolicy inboxRetentionPolicy() {
156:    return new InboxRetentionPolicy(InboxRetentionPolicy.DEFAULT_RETENTION, Duration.ofDays(1));
167:  @ConditionalOnBean(InboxRepository.class)
169:  public InboxCleanupJob inboxCleanupJob(InboxRepository inbox, InboxRetentionPolicy policy) {
170:    return new InboxCleanupJob(inbox, policy, 20);
180:  @ConditionalOnBean(IdempotentConsumer.class)
182:  public TransactionalInboxHandler<Object> transactionalInboxHandler(IdempotentConsumer consumer) {
---- admin ----
27:@ConditionalOnProperty(prefix = "app.messaging.admin", name = "enabled", havingValue = "true")
28:public class MessagingAdminAutoConfiguration {
35:  @Bean
36:  @ConditionalOnMissingBean
40:    return new DestructiveOperationGuard(false);
54:  @Bean
55:  @ConditionalOnMissingBean
57:    return new InMemoryAdminOperationJournal();
67:  @Bean
68:  @ConditionalOnMissingBean
71:    return new MessagingAdminDurabilityValidator(journal, environment);
80:  @Bean
81:  @ConditionalOnBean(BrokerTopologyInspector.class)
82:  @ConditionalOnMissingBean
84:    return new CompositeTopologyValidator(inspector);
