diff --git a/docker-compose.yml b/docker-compose.yml index 4d7f6b875..d292a78ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -103,7 +103,7 @@ services: - "9092:9092" environment: ALLOW_PLAINTEXT_LISTENER: "yes" - # KAFKA_ADVERTISED_HOST_NAME: kafka + KAFKA_ADVERTISED_HOST_NAME: kafka KAFKA_LISTENERS: LISTENER_DOCKER://kafka:29092,LISTENER_INTERN://kafka:9093,LISTENER_EXTERN://0.0.0.0:9092 KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER://kafka:29092,LISTENER_INTERN://kafka:9093,LISTENER_EXTERN://127.0.0.1:9092 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER:PLAINTEXT,LISTENER_INTERN:PLAINTEXT,LISTENER_EXTERN:PLAINTEXT diff --git a/modules/api-svc/src/OutboundServer/handlers.js b/modules/api-svc/src/OutboundServer/handlers.js index cce68942f..8ae9bc179 100644 --- a/modules/api-svc/src/OutboundServer/handlers.js +++ b/modules/api-svc/src/OutboundServer/handlers.js @@ -269,10 +269,10 @@ const postBulkTransactions = async (ctx) => { try { const msg = new SDKOutboundBulkRequestReceivedDmEvt({ bulkRequest: ctx.request.body, - headers: ctx.request.headers, + headers: [ctx.request.headers], timestamp: Date.now(), }); - await ctx.state._eventProducer.sendDomainEvent(msg); + await ctx.state.eventProducer.sendDomainEvent(msg); ctx.state.eventLogger.info(`Sent domain event ${msg.getName()}`); ctx.response.status = 204; @@ -293,20 +293,20 @@ const putBulkTransactions = async (ctx) => { msg = new SDKOutboundBulkAcceptPartyInfoReceivedDmEvt({ bulkId: ctx.state.path.params.bulkTransactionId, bulkTransactionContinuationAcceptParty: ctx.request.body, - headers: ctx.request.headers, + headers: [ctx.request.headers], timestamp: Date.now(), }); } else if (ctx.request.body.individualTransfers[0]?.hasOwnProperty('acceptQuote')) { msg = new SDKOutboundBulkAcceptQuoteReceivedDmEvt({ bulkId: ctx.state.path.params.bulkTransactionId, bulkTransactionContinuationAcceptQuote: ctx.request.body, - headers: ctx.request.headers, + headers: [ctx.request.headers], timestamp: Date.now(), }); } if (msg) { - await ctx.state._eventProducer.sendDomainEvent(msg); + await ctx.state.eventProducer.sendDomainEvent(msg); ctx.state.eventLogger.info(`Sent domain event ${msg.getName()}`); }