Skip to content

Commit f70e826

Browse files
authored
request if to cloent correwlation id (#104)
1 parent 2e2cfcb commit f70e826

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/org/mifos/processor/bulk/camel/routes/InitSubBatchRoute.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ public void configure() throws Exception {
128128
int index = exchange.getProperty(Exchange.LOOP_INDEX, Integer.class);
129129
List<Transaction> transactionList = exchange.getProperty(TRANSACTION_LIST, List.class);
130130
Transaction transaction = transactionList.get(index);
131+
exchange.setProperty(REQUEST_ID, transaction.getRequestId());
132+
logger.info("REQUEST_ID: {}", transaction.getRequestId());
131133
exchange.setProperty(TRANSACTION_LIST_ELEMENT, transaction);
132-
}).setHeader("Platform-TenantId", exchangeProperty(TENANT_NAME)).to("direct:dynamic-payload-setter")
134+
}).setHeader("Platform-TenantId", exchangeProperty(TENANT_NAME))
135+
.setHeader("X-CorrelationID", exchangeProperty(REQUEST_ID))
136+
.to("direct:dynamic-payload-setter")
133137
.to("direct:external-api-call").to("direct:external-api-response-handler").end() // end loop block
134138
.endChoice();
135139

0 commit comments

Comments
 (0)