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

camel-influxdb Query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.21.0
    • Fix Version/s: 2.21.1, 2.22.0
    • Component/s: camel-influxdb
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: