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:
us...@infra.apache.org


Reply via email to