Re: Having problem with creating producer from camel route for Kafka

2018-03-07 Thread Ranabroto Ghosh
 I am sorry, yes i created another post and got solution already. Many
thanks.

On 7 March 2018 at 15:11, Ranabroto Ghosh 
wrote:

> I am sorry, yes i created another post and got solution already. Many
> thanks.
>
> On 7 March 2018 at 15:08, Claus Ibsen-2 [via Camel] <
> ml+s465427n5818244...@n5.nabble.com> wrote:
>
>> Hi
>>
>> We cannot se HTML emails with screenshots etc. Can you please post plain
>> text emails.
>>
>> On Wed, Mar 7, 2018 at 3:18 PM, Ranabroto Ghosh <
>> [hidden email] >
>> wrote:
>>
>> > Hi I have simple route triggered by REST api and want to put a message
>> to
>> > kafka
>> >
>> > pom.xml: using camel 2.20.0
>> >
>> >  Camel route:
>> >
>> >
>> >
>> > Error I get
>> >
>> >
>> > I have tried removing all unknown parameters, and tried simple
>> >
>> > 
>> >
>> > Then i get below erro
>> >
>> >
>> > I can confirm my kafka server is working fine, as i can put message and
>> > retried using kafka console create producer and consumer terminal.
>> >
>> >
>> >
>> > --
>> > Kind Regards
>> > Rana
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>>
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://camel.465427.n5.nabble.com/Having-problem-with-creati
>> ng-producer-from-camel-route-for-Kafka-tp5818237p5818244.html
>> To unsubscribe from Camel, click here
>> 
>> .
>> NAML
>> 
>>
>
>
>
> --
> Kind Regards
> Rana
>



-- 
Kind Regards
Rana


Re: Having problem while creating producer from camel route for Kafka

2018-03-07 Thread Ranabroto Ghosh
 Many thanks, it worked.

On 7 March 2018 at 14:52, Ranabroto Ghosh 
wrote:

> Many thanks, it worked.
>
> On 7 March 2018 at 14:35, Andrea Cosentino-2 [via Camel] <
> ml+s465427n581824...@n5.nabble.com> wrote:
>
>> The options you're trying to use are wrong:
>>
>> you need to use requestRequiredAcks instead of acks in the uri and
>> brokers instead of bootstrapServers.
>>
>> You can find the option here for 2.20.x
>>
>> https://github.com/apache/camel/blob/camel-2.20.x/components
>> /camel-kafka/src/main/docs/kafka-component.adoc
>>
>> --
>> Andrea Cosentino
>> --
>> Apache Camel PMC Member
>> Apache Karaf Committer
>> Apache Servicemix PMC Member
>> Email: [hidden email]
>> 
>> Twitter: @oscerd2
>> Github: oscerd
>>
>>
>>
>>
>>
>>
>> On Wednesday, March 7, 2018, 3:30:55 PM GMT+1, Ranabroto Ghosh <[hidden
>> email] > wrote:
>>
>>
>>
>>
>>
>> Hello
>>
>> I have simple route triggered by REST api and want to put a message to
>> kafka
>>
>>
>> *pom.xml*
>>
>> 
>> org.apache.camel
>> camel-kafka
>> 2.20.0
>> 
>> 
>> org.apache.kafka
>> kafka-clients
>> 
>> 
>> 
>> 
>> org.apache.kafka
>> kafka-clients
>> 1.0.1
>> 
>>
>>
>> Camle Route:
>>
>> 
>> 
>> 
>> ${header.id}
>> 
>> 
>>
>> ${header.id}
>> 
>>
>>
>> I get below error:
>>
>> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
>> resolve endpoint: kafka://
>> rgdev8.globalcharge.com:9092?acks=0=rgdev8.
>> globalcharge.com%3A9092=test=test&
>> retries=0=org.apache.kafka.common.
>> serialization.ByteArraySerializer=test_topic_rana
>> due to: There are 2 parameters that couldn't be set on the endpoint.
>> Check
>> the uri if the parameters are spelt correctly and that they are
>> properties
>> of the endpoint. Unknown parameters=[{acks=0, bootstrapServers=
>> rgdev8.globalcharge.com:9092}]
>> at
>> org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:215)
>>
>> at
>> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:139)
>>
>> at
>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:703)
>>
>> ... 86 more
>>
>>
>> I have tried removing all unknown parameters, and tried simple
>>
>> http://rgdev8.globalcharge.com:9092/?topic=test_topic_rana>"/>
>>
>> Then I get below error:
>>
>> Caused by: java.lang.NullPointerException
>> at java.util.Hashtable.put(Hashtable.java:460)
>> at
>> org.apache.camel.component.kafka.KafkaProducer.getProps(KafkaProducer.java:63)
>>
>> at
>> org.apache.camel.component.kafka.KafkaProducer.doStart(KafkaProducer.java:89)
>>
>> at
>> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
>> at
>> org.apache.camel.impl.DeferServiceStartupListener.onCamelCon
>> textStarted(DeferServiceStartupListener.java:49)
>> at
>> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteSe
>> rvices(DefaultCamelContext.java:3846)
>> at
>> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRou
>> tes(DefaultCamelContext.java:3625)
>> at
>> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3477)
>>
>> at
>> org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:208)
>>
>> at
>> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3236)
>>
>> at
>> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3232)
>>
>> at
>> org.apache.camel.impl.DefaultCamelContext.doWithDefinedClass
>> Loader(DefaultCamelContext.java:3255)
>> at
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3232)
>>
>> at
>> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
>> at
>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3155)
>>
>> at
>> org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:133)
>>
>> ... 64 more
>>
>> I can confirm my kafka server is working fine, as i can put message and
>> retried using kafka console create producer and consumer terminal.
>> Please
>> help
>>
>> --
>> Kind Regards
>> Rana
>>
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://camel.465427.n5.nabble.com/Having-problem-while-creat
>> ing-producer-from-camel-route-for-Kafka-tp5818241p5818242.html
>> To unsubscribe from Camel, click here
>> 
>> .
>> NAML
>> 

Re: Having problem with creating producer from camel route for Kafka

2018-03-07 Thread Claus Ibsen
Hi

We cannot se HTML emails with screenshots etc. Can you please post plain
text emails.

On Wed, Mar 7, 2018 at 3:18 PM, Ranabroto Ghosh <
ranabroto.gh...@globalcharge.com> wrote:

> Hi I have simple route triggered by REST api and want to put a message to
> kafka
>
> pom.xml: using camel 2.20.0
>
>  Camel route:
>
>
>
> Error I get
>
>
> I have tried removing all unknown parameters, and tried simple
>
> 
>
> Then i get below erro
>
>
> I can confirm my kafka server is working fine, as i can put message and
> retried using kafka console create producer and consumer terminal.
>
>
>
> --
> Kind Regards
> Rana
>



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Having problem while creating producer from camel route for Kafka

2018-03-07 Thread Andrea Cosentino
The options you're trying to use are wrong:

you need to use requestRequiredAcks instead of acks in the uri and brokers 
instead of bootstrapServers.

You can find the option here for 2.20.x

https://github.com/apache/camel/blob/camel-2.20.x/components/camel-kafka/src/main/docs/kafka-component.adoc

--
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Wednesday, March 7, 2018, 3:30:55 PM GMT+1, Ranabroto Ghosh 
 wrote: 





Hello

I have simple route triggered by REST api and want to put a message to kafka


*pom.xml*

    
    org.apache.camel
    camel-kafka
    2.20.0
    
    
    org.apache.kafka
    kafka-clients
    
    

    
    org.apache.kafka
    kafka-clients
    1.0.1



Camle Route:




${header.id}


${header.id}



I get below error:

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: kafka://
rgdev8.globalcharge.com:9092?acks=0=rgdev8.globalcharge.com%3A9092=test=test=0=org.apache.kafka.common.serialization.ByteArraySerializer=test_topic_rana
due to: There are 2 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{acks=0, bootstrapServers=
rgdev8.globalcharge.com:9092}]
        at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:215)
        at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:139)
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:703)
        ... 86 more


I have tried removing all unknown parameters, and tried simple

http://rgdev8.globalcharge.com:9092/?topic=test_topic_rana>"/>

Then I get below error:

Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:460)
        at
org.apache.camel.component.kafka.KafkaProducer.getProps(KafkaProducer.java:63)
        at
org.apache.camel.component.kafka.KafkaProducer.doStart(KafkaProducer.java:89)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
        at
org.apache.camel.impl.DeferServiceStartupListener.onCamelContextStarted(DeferServiceStartupListener.java:49)
        at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3846)
        at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3625)
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3477)
        at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:208)
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3236)
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3232)
        at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3255)
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3232)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3155)
        at
org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:133)
        ... 64 more

I can confirm my kafka server is working fine, as i can put message and
retried using kafka console create producer and consumer terminal.  Please
help

-- 
Kind Regards
Rana