Skip to content

🐛 [BUG] - NullPointerException in Kafka Connect Pipeline when JMS Property Key is Empty #145

Open
@balajisekarraman

Description

@balajisekarraman

What happened?

In MQ, if the value for any of the JMS property keys is empty, and we set the property mq.jms.properties.copy.to.kafka.headers = true in our connector properties, the Kafka Connect pipeline fails with a "NullPointerException" while attaching those properties in my kafka headers , As a result, the messages are routed to the BO queue.

PR - #144

Type of issue - Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested? - YES

Tried setting the flag as false for mq.jms.properties.copy.to.kafka.headers and there are no exception but the properties from my MQ is not attached to my kafka headers

Handled the scneario in the jmsToKafkaHeaderConverter class , where is the value for a key is empty/null then we are passing the value for that particular key as a empty string "" , by doing this the messages are not moving to BO queue and my kafka connect pipeline is running without any exception

Steps To Reproduce

set mq.jms.properties.copy.to.kafka.headers as true to kafka connect properties and bring up the connector , from the MQ topic produce a msg to the subscribed queue . In my scenario ,one of the key of JMS properties had a empty value and when consuming that messaging via kafka connect the message failed with Null pointer Exception and moved to back out queue .

Environment

- Kubernetes:

Anything else?

No response

Version

2.3.0 (Default)

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions