i-dnyan opened a new issue, #1795:
URL: https://github.com/apache/camel-kafka-connector/issues/1795

   ## Description
   `CamelSyslogSourceConnector` fails when receiving syslog messages with the 
following error:
   
   ```
   org.apache.camel.NoTypeConversionAvailableException: No type converter 
available to 
   convert from type: io.netty.buffer.PooledUnsafeDirectByteBuf to the required 
type: 
   org.apache.camel.component.syslog.SyslogMessage
   ```
   
   ## Version
   - camel-kafka-connector: 4.18.0
   - Apache Camel: 4.18.0
   - Kafka: 4.3.1
   
   ## Root Cause
   In `CamelKafkaConnectMain.java`, the `ckcUnMarshal` route template 
incorrectly calls 
   `.marshal()` instead of `.unmarshal()`:
   
   ```java
   // Bug - in 
core/src/main/java/org/apache/camel/kafkaconnector/utils/CamelKafkaConnectMain.java
   routeTemplate("ckcUnMarshal")
           .templateParameter("unmarshal", "dummyDataformat")
           .from("kamelet:source")
           .marshal("{{unmarshal}}")   // <- should be .unmarshal()
           .to("kamelet:sink");
   ```
   
   This causes the raw Netty `PooledUnsafeDirectByteBuf` to never get 
deserialized into 
   a `SyslogMessage`, resulting in the error above.
   
   This is a regression from `0.11.x` where the route was built directly 
without kamelets:
   
   ```java
   // 0.11.5 - worked correctly
   rd.unmarshal(unmarshallDataFormat);
   ```
   
   ## Fix
   Change `.marshal()` to `.unmarshal()` in the `ckcUnMarshal` route template:
   
   ```java
   routeTemplate("ckcUnMarshal")
           .templateParameter("unmarshal", "dummyDataformat")
           .from("kamelet:source")
           .unmarshal("{{unmarshal}}")   // <- fixed
           .to("kamelet:sink");
   ```
   
   ## Impact
   This bug affects any connector that uses `camel.source.unmarshal`, not just 
syslog.
   
   ## Steps to Reproduce
   1. Set up Kafka Connect with `camel-syslog-kafka-connector` version `4.18.0`
   2. Configure `CamelSyslogSourceConnector` to listen on UDP port 514
   3. Send a syslog message
   4. Observe `NoTypeConversionAvailableException` in the logs
   
   ## Expected Behavior
   Syslog messages are correctly unmarshalled into `SyslogMessage` and 
published to Kafka topic.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to