<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
	xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
	xsi:schemaLocation="
		http://www.osgi.org/xmlns/blueprint/v1.0.0 
		http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd

		http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
		http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd

		http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0
		http://aries.apache.org/schemas/blueprint-ext/blueprint-ext-1.1.xsd
">

	<cm:property-placeholder id="syslogHandlerDefaultKafkaProperties" persistent-id="org.opennms.netmgt.syslog.handler.kafka.default" placeholder-prefix="$[" placeholder-suffix="]" update-strategy="none">
		<cm:default-properties>
			<cm:property name="kafkahost" value="127.0.0.1" />
			<cm:property name="kafkaport" value="9092" />
			<cm:property name="kafkatopic" value="syslog" />
			<cm:property name="zookeeperhost" value="127.0.0.1"/>
			<cm:property name="zookeeperport" value="2181"/>
			<cm:property name="groupId" value="syslogconsumer"/>
		</cm:default-properties>
	</cm:property-placeholder>
	
	<bean id="syslogConnectionHandlerDefault" class="org.opennms.netmgt.syslogd.SyslogConnectionHandlerDefaultImpl"/>
	
	<camelContext id="syslogConnectionHandlerDefaultContext" xmlns="http://camel.apache.org/schema/blueprint">
		<propertyPlaceholder id="properties" location="blueprint:syslogHandlerDefaultKafkaProperties" />

		<route id="receiveSyslogConnectionViaKafka">
			<from uri="kafka:{{kafkahost}}:{{kafkaport}}?topic={{kafkatopic}}&amp;zookeeperHost={{zookeeperhost}}&amp;zookeeperPort={{zookeeperport}}&amp;groupId={{groupId}}"/>
				<convertBodyTo type="org.opennms.netmgt.syslogd.SyslogConnection"/>
			<bean ref="syslogConnectionHandlerDefault"/>
		</route>
	</camelContext>
</blueprint>