feat(worker): use EventConsumerAdapter<NatsMessageSource> — transport-agnostic consuming

This commit is contained in:
2026-05-14 12:37:16 +02:00
parent e995b29be1
commit 69b55058ce
2 changed files with 5 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ async fn main() {
tracing::info!("Connecting to NATS at {nats_url}...");
let nats_client = async_nats::connect(&nats_url).await.expect("NATS connect failed");
let consumer = nats::NatsEventConsumer::new(nats_client);
let consumer = event_transport::EventConsumerAdapter::new(nats::NatsMessageSource::new(nats_client));
let notification_handler = handlers::NotificationHandler {
thoughts: Arc::new(postgres::thought::PgThoughtRepository::new(pool.clone())),