camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay mann (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-10087) camel-kafka does not work in OSGI container
Date Fri, 24 Jun 2016 22:13:16 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348772#comment-15348772
] 

Jay mann edited comment on CAMEL-10087 at 6/24/16 10:13 PM:
------------------------------------------------------------

Sorry Jira was down for a long time...  I was able to debug, The problem is the consumer.
 You only implemented the fix for the producer.  The consumer tries to create the following
key classes:

{code}
partition.assignment.strategy=org.apache.kafka.clients.consumer.RangeAssignor
key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
{code}

I tried to implement you patch into the consumer, but it fails because it expects "partition.assignment.strategy"
to be an array of strings.  

I don't know how you can work around that without modifying the kafka code.

For reference here is my route:

{code:xml}
        <route>
            <from uri="kafka:localhost:9092?topic=component-in&groupId=jman&autoOffsetReset=earliest&consumersCount=1"
/>
            <log message="Received from Kafka ${body}" />
            <setHeader headerName="kafka.PARTITION_KEY">
                <constant>0</constant>
            </setHeader>
            <setHeader headerName="kafka.CONTENT_TYPE">
                <constant>1</constant>
            </setHeader>
            <to uri="kafka:localhost:9092?topic=component-out&bridgeEndpoint=true"
/>
        </route>
{code}





was (Author: jmandawg):
Sorry Jira was down for a long time...  I was able to debug, The problem is the consumer.
 You only implemented the fix for the producer.  The consumer tries to create the following
key classes:

partition.assignment.strategy=org.apache.kafka.clients.consumer.RangeAssignor
key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
value.deserializer=org.apache.kafka.common.serialization.StringDeserializer

I tried to implement you patch into the consumer, but it fails because it expects "partition.assignment.strategy"
to be an array of strings.  

I don't know how you can work around that without modifying the kafka code.

For reference here is my route:

        <route>
            <from uri="kafka:localhost:9092?topic=component-in&groupId=jman&autoOffsetReset=earliest&consumersCount=1"
/>
            <log message="Received from Kafka ${body}" />
            <setHeader headerName="kafka.PARTITION_KEY">
                <constant>0</constant>
            </setHeader>
            <setHeader headerName="kafka.CONTENT_TYPE">
                <constant>1</constant>
            </setHeader>
            <to uri="kafka:localhost:9092?topic=component-out&bridgeEndpoint=true"
/>
        </route>





> camel-kafka does not work in OSGI container
> -------------------------------------------
>
>                 Key: CAMEL-10087
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10087
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-kafka
>    Affects Versions: 2.17.1
>            Reporter: Jay mann
>
> Currently this component is broken in OSGI environment due to this:
> https://issues.apache.org/jira/browse/KAFKA-3218
> We can leave it broken until they get their bugs worked out.  Or i can submit a PR with
an intermediate fix that should work, as described in the jira noted above.
> https://github.com/apache/camel/pull/1049



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message