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

Kafka: Adapter causes Camel NotifyBuilder to throw a NullPointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.2
    • 2.15.3, 2.16.0, 2.14.4
    • camel-kafka
    • None
    • Patch Available
    • Unknown
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: