Issue
Does XML configuration can access kafka properties in apache camel
There is no kafka and spring XML configuration is available anywhere
class="snippet-code">
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:SpringXMLRouteStart" />
<setHeader headerName="CamelHttpMethod">
<constant>GET</constant>
</setHeader>
<!-- To printout the routing message on the IDE console -->
<to uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" />
</route>
<route>
<from uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" />
<to uri="kafka://localhost:9092?topic=customtopic&zookeeperHost=localhost:2181" />
</route>
</camelContext>
.....................My Error ...............
org.xml.sax.SAXParseException: The reference to entity "zookeeperHost" must end with the ';' delimiter.
Thanks in Advance
Solution
Since you're using XML, you can't use '&' in route URIs like you would with the Java DSL so do:
&zookeeperHost=localhost:2181
Answered By - James Netherton
Answer Checked By - Marilyn (JavaFixing Volunteer)