You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/05/14 22:45:24 UTC

[GitHub] [camel] davsclaus commented on a change in pull request #5504: CAMEL-16577 add support to set the index time

davsclaus commented on a change in pull request #5504:
URL: https://github.com/apache/camel/pull/5504#discussion_r632847089



##########
File path: components/camel-splunk-hec/src/main/java/org/apache/camel/component/splunkhec/SplunkHECProducer.java
##########
@@ -128,5 +131,25 @@ private void buildPayload(Map<String, Object> payload) {
         if (endpoint.getConfiguration().getHost() != null) {
             payload.put("host", endpoint.getConfiguration().getHost());
         }
+
+        Object timeInput = message.getHeader(SplunkHECComponent.INDEX_TIME, endpoint.getConfiguration().getTime());

Review comment:
       You should use Camel's type converter, and use getHeader where you can specify the returned time as Long so Camel deal with type conversions. Then all the code below can be removed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org