- // Call the concurrent Task executor to handle the incoming request
- dmaapMessageHandler.handleDmaapMsg(msg);
+ createDmaapMessageHandler().handleDmaapMsg(msg);
+ }
+
+ protected DmaapMessageHandler createDmaapMessageHandler() {
+ String agentBaseUrl = "http://localhost:" + this.localServerPort;
+ AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl);
+ return new DmaapMessageHandler(this.producer, this.applicationConfig, agentClient);