Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12384

camel-influxdb Query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.21.0
    • 2.21.1, 2.22.0
    • camel-influxdb
    • None
    • Unknown

    Description

      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.   

       

       

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

       

      I suggest that line 108 is changed to:

       exchange.getIn().setBody(resultSet);

       

       

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            andyflatt AndyFlatt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: