TypeConversionException in Apache Camel 4 when pulling messages with JMS headers from Kafka

Solution Verified - Updated -

Issue

When pulling messages from a Kafka topic using Red Hat Build of Apache Camel 4 containing JMS type Headers, and routing them to a JMS Queue, a TypeConversionException is produced.

WARN 11202 --- [er[input-topic]] o.a.camel.component.kafka.KafkaConsumer  : Error during processing. Exchange[338A3D7ADE63460-0000000000000000]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: byte[] to the required type: java.lang.Long with value [B@218c3d49 due to java.lang.NumberFormatException: For input string: "    "]

Environment

  • Red Hat Build of Apache Camel 4
    • camel-kafka component as input
    • camel-jms component as output
  • Java 17

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content