You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2018/03/20 14:47:00 UTC

[jira] [Resolved] (CAMEL-12384) camel-influxdb Query

     [ https://issues.apache.org/jira/browse/CAMEL-12384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-12384.
--------------------------------------
    Resolution: Fixed

> 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)