Clinical Sync Batch Engine: first commit

This commit is contained in:
voltsrage
2026-06-23 03:02:30 +08:00
parent 90b8baa2a1
commit c9994b1ba2
60 changed files with 3547 additions and 31 deletions
@@ -10,6 +10,9 @@ public sealed class RabbitMqTopologyProvisioner : IHostedService
public const string EscalKey = "alerts.escalation";
public const string DischargeKey = "notifications.discharge";
public const string ReconciliationKey = "notifications.reconciliation";
public const string SyncExchange = "clinical.sync";
public const string SyncBatchReceivedKey = "sync.batch_received";
public const string SyncBatchQueue = "clinical.sync.batch_received";
private readonly RabbitMqOptions _opts;
private readonly IHostEnvironment _env;
@@ -131,6 +134,16 @@ public sealed class RabbitMqTopologyProvisioner : IHostedService
arguments: null);
channel.QueueBind("notifications.reconciliation.queue", Exchange, ReconciliationKey);
channel.ExchangeDeclare(SyncExchange, ExchangeType.Topic, durable: true);
channel.QueueDeclare(
queue: SyncBatchQueue,
durable: true,
exclusive: false,
autoDelete: false,
arguments: null);
channel.QueueBind(SyncBatchQueue, SyncExchange, SyncBatchReceivedKey);
_logger.LogInformation(
"RabbitMQ topology provisioned. Exchange={Exchange} PagingDlqTtlMs={Ttl}",
Exchange, _opts.PagingAckTimeoutMs);