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

Kafka: Adapter causes Camel NotifyBuilder to throw a NullPointer exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.15.2
    • Fix Version/s: 2.15.3, 2.16.0, 2.14.4
    • Component/s: camel-kafka
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown
    • Flags:
      Patch

      Description

      Camel-kafka component (2.15.1) gives a NullPointer exception in NotifyBuilder causing our assertions to fail.

      The error seems to be due to the fact that the Exchange created by the component has fromEndPoint set to null.

      In KafkaEndpoint.java

      public Exchange createKafkaExchange(MessageAndMetadata<byte[], byte[]> mm) {
      Exchange exchange = new DefaultExchange(getCamelContext(), getExchangePattern());

      I believe this should be instantiated as
      Exchange exchange = new DefaultExchange(this, getExchangePattern());

        Attachments

        1. CAMEL-8908.diff
          0.9 kB
          RAHUL JAIN

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              rahulj51 RAHUL JAIN
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: