import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
-import java.io.IOException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
return result;
}
- protected Iterable<String> fetchAllMessages() throws ServiceException, IOException {
+ protected Iterable<String> fetchAllMessages() throws ServiceException {
String topicUrl = this.applicationConfig.getDmaapConsumerTopicUrl();
AsyncRestClient consumer = getMessageRouterConsumer();
ResponseEntity<String> response = consumer.getForEntity(topicUrl).block();
}
}
- private void processMsg(String msg) throws IOException {
+ private void processMsg(String msg) {
logger.debug("Message Reveived from DMAAP : {}", msg);
getDmaapMessageHandler().handleDmaapMsg(msg);
}
- protected DmaapMessageHandler getDmaapMessageHandler() throws IOException {
+ protected DmaapMessageHandler getDmaapMessageHandler() {
if (this.dmaapMessageHandler == null) {
String agentBaseUrl = "http://localhost:" + this.localServerHttpPort;
- AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl);
+ AsyncRestClient agentClient =
+ new AsyncRestClient(agentBaseUrl, this.applicationConfig.getWebClientConfig());
AsyncRestClient producer = new AsyncRestClient(this.applicationConfig.getDmaapProducerTopicUrl(),
this.applicationConfig.getWebClientConfig());
this.dmaapMessageHandler = new DmaapMessageHandler(producer, agentClient);