[ 
https://issues.apache.org/jira/browse/CAMEL-12384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16406432#comment-16406432
 ] 

Andrea Cosentino commented on CAMEL-12384:
------------------------------------------

Now the headers are copied from in to out

> camel-influxdb Query 
> ---------------------
>
>                 Key: CAMEL-12384
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12384
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-influxdb
>    Affects Versions: 2.21.0
>            Reporter: AndyFlatt
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 2.21.1, 2.22.0
>
>
> In 
> [https://github.com/apache/camel/blob/master/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbProducer.java]
> on line 108, the out message on the exchange is mutated with the result.  
> These means that the messages headers and attachments are lost when querying. 
>   
>  
>  
> {code:java}
> private void doQuery(Exchange exchange, String dataBaseName, String 
> retentionPolicy) {
>   String query = calculateQuery(exchange);
>   Query influxdbQuery = new Query(query, dataBaseName);
>   QueryResult resultSet = connection.query(influxdbQuery);
>   exchange.getOut().setBody(resultSet);
> }
> {code}
>  
> I suggest that line 108 is changed to:
> {code:java}
>  exchange.getIn().setBody(resultSet);{code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to