Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
balajisekarraman opened this issue Feb 12, 2025 · 0 comments
Labels

Comments

@balajisekarraman
Copy link

balajisekarraman commented Feb 12, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant