add test payment event

This commit is contained in:
Abubeker Yasin
2026-06-30 15:51:47 +03:00
parent 35a2a200d6
commit a667f5b2df
4 changed files with 192 additions and 0 deletions

View File

@@ -11,6 +11,12 @@ import { OutboxRepository } from "./outbox.repository";
import { HttpPaymentEventPublisher } from "./publisher/http-payment-event-publisher";
import { PAYMENT_EVENT_PUBLISHER } from "./publisher/payment-event-publisher";
import { RabbitMqPaymentEventPublisher } from "./publisher/rabbitmq-payment-event-publisher";
import { TestEventsController } from "./test-events.controller";
// Dev-only harness to publish a synthetic payment event straight to the broker.
// Never registered in production, so the endpoint cannot exist there.
const testControllers =
process.env.NODE_ENV !== "production" ? [TestEventsController] : [];
const rabbitImports = isRabbitPublisher()
? [
@@ -42,6 +48,7 @@ const rabbitImports = isRabbitPublisher()
HttpModule,
...rabbitImports,
],
controllers: testControllers,
providers: [
OutboxRepository,
OutboxRelayService,