[
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:14 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 your 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 what my route looks like:
{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:
{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}
> 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)