sidharthramesh opened a new issue, #1526:
URL: https://github.com/apache/camel-kafka-connector/issues/1526

   I am trying to use kafka connect with camel-netty-http to open up a HTTP 
endpoint to receive HTTP requests as Kafka messages in a topic.
   
   I'm using camel-netty-http-kafka-connector version `3.20.3`:
   ```xml
   <dependency>
         <groupId>org.apache.camel.kafkaconnector</groupId>
         <artifactId>camel-netty-http-kafka-connector</artifactId>
         <version>3.20.3</version>
         <exclusions>
           <exclusion>
               <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-api</artifactId>
             </exclusion>
         </exclusions>
    </dependency>
   ```
   
   with Kafka and Kafka Connect version `2.8.2`
   
   with the following `connector.properties` for netty http kafka connector:
   ```
   name=http-source-2
   
connector.class=org.apache.camel.kafkaconnector.nettyhttp.CamelNettyhttpSourceConnector
   camel.source.path.protocol=http
   camel.source.path.host=0.0.0.0
   camel.source.pollingConsumerBlockTimeout=0
   value.converter=org.apache.kafka.connect.storage.StringConverter
   key.converter=org.apache.kafka.connect.storage.StringConverter
   ```
   
   I receive this error:
   ```
   [2023-04-30 15:38:37,600] INFO Setting initial properties in Camel context: 
[[connector.class=org.apache.camel.kafkaconnector.nettyhttp.CamelNettyhttpSourceConnector,
 camel.kamelet.ckcSource.fromUrl=netty-http:http://0.0.0.0, 
camel.kamelet.ckcAggregator.aggregationSize=10, 
camel.source.path.protocol=http, 
camel.kamelet.ckcAggregator.aggregationTimeout=500, 
camel.source.component=netty-http, camel.source.path.host=0.0.0.0, 
task.class=org.apache.camel.kafkaconnector.nettyhttp.CamelNettyhttpSourceTask, 
name=http-source-2, 
value.converter=org.apache.kafka.connect.storage.StringConverter, 
camel.source.pollingConsumerBlockTimeout=0, 
key.converter=org.apache.kafka.connect.storage.StringConverter]] 
(org.apache.camel.kafkaconnector.utils.CamelKafkaConnectMain:297)
   [2023-04-30 15:38:37,663] ERROR WorkerSourceTask{id=http-source-2-0} Task 
threw an uncaught and unrecoverable exception. Task is being killed and will 
not recover until manually restarted 
(org.apache.kafka.connect.runtime.WorkerTask:190)
   org.apache.kafka.connect.errors.ConnectException: Failed to create and start 
Camel context
           at 
org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:184)
           at 
org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:231)
           at 
org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
           at 
org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:833)
   Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to 
resolve endpoint: 
seda://end?pollingConsumerBlockTimeout=0&pollingConsumerBlockWhenFull=true&pollingConsumerQueueSize=1000
 due to: Error binding property (pollingConsumerBlockTimeout=0) with name: 
pollingConsumerBlockTimeout on bean: 
seda://end?pollingConsumerBlockTimeout=0&pollingConsumerBlockWhenFull=true&pollingConsumerQueueSize=1000
 with value: 0
           at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:1009)
           at 
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:891)
           at 
org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:177)
           ... 8 more
   Caused by: org.apache.camel.PropertyBindingException: Error binding property 
(pollingConsumerBlockTimeout=0) with name: pollingConsumerBlockTimeout on bean: 
seda://end?pollingConsumerBlockTimeout=0&pollingConsumerBlockWhenFull=true&pollingConsumerQueueSize=1000
 with value: 0
           at 
org.apache.camel.support.PropertyBindingSupport.setSimplePropertyViaReflection(PropertyBindingSupport.java:768)
           at 
org.apache.camel.support.PropertyBindingSupport.doSetPropertyValue(PropertyBindingSupport.java:498)
           at 
org.apache.camel.support.PropertyBindingSupport.doBuildPropertyOgnlPath(PropertyBindingSupport.java:356)
           at 
org.apache.camel.support.PropertyBindingSupport.doBindProperties(PropertyBindingSupport.java:233)
           at 
org.apache.camel.support.PropertyBindingSupport$Builder.bind(PropertyBindingSupport.java:1864)
           at 
org.apache.camel.support.DefaultEndpoint.setProperties(DefaultEndpoint.java:422)
           at 
org.apache.camel.support.DefaultEndpoint.configureProperties(DefaultEndpoint.java:394)
           at 
org.apache.camel.support.DefaultComponent.setProperties(DefaultComponent.java:429)
           at 
org.apache.camel.component.seda.SedaComponent.createEndpoint(SedaComponent.java:271)
           at 
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:171)
           at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:975)
           ... 10 more
   Caused by: java.lang.IllegalArgumentException: Could not find a suitable 
setter for property: pollingConsumerBlockTimeout as there isn't a setter method 
with same type: java.lang.String nor type conversion possible: No type 
converter available to convert from type: java.lang.String to the required 
type: long
           at 
org.apache.camel.support.IntrospectionSupport.setProperty(IntrospectionSupport.java:845)
           at 
org.apache.camel.impl.engine.DefaultBeanIntrospection.setProperty(DefaultBeanIntrospection.java:199)
           at 
org.apache.camel.support.PropertyBindingSupport.doSetSimplePropertyViaReflection(PropertyBindingSupport.java:877)
           at 
org.apache.camel.support.PropertyBindingSupport.setSimplePropertyViaReflection(PropertyBindingSupport.java:764)
           ... 20 more
   [2023-04-30 15:38:37,665] INFO Stopping CamelSourceTask connector task 
(org.apache.camel.kafkaconnector.CamelSourceTask:286)
   [2023-04-30 15:38:37,668] WARN A critical error may have occurred and there 
is no consumer to stop (org.apache.camel.kafkaconnector.CamelSourceTask:291)
   [2023-04-30 15:38:37,669] INFO Apache Camel 3.20.3 (camel-1) is shutting 
down (org.apache.camel.impl.engine.AbstractCamelContext:3472)
   [2023-04-30 15:38:37,672] INFO Routes stopped (stopped:0) 
(org.apache.camel.impl.engine.AbstractCamelContext:166)
   [2023-04-30 15:38:37,673] INFO Apache Camel 3.20.3 (camel-1) shutdown in 3ms 
(uptime:) (org.apache.camel.impl.engine.AbstractCamelContext:3609)
   [2023-04-30 15:38:37,673] INFO CamelSourceTask connector task stopped 
(org.apache.camel.kafkaconnector.CamelSourceTask:310)```
   ```


-- 
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