Skip to content

Sample Wiring File

shmurthy62 edited this page Feb 11, 2015 · 8 revisions

This section illustrates wiring syntax for a pipeline as shown below.

Screenshot

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"

	default-lazy-init="true">

	<bean id="InboundMessageBinder" scope="singleton"
		class="com.ebay.jetstream.event.support.channel.ChannelBinding"
		depends-on="MessageService">
		<property name="channel" ref="InboundMessages">

		</property>
	</bean>

        <bean id="InboundMessages"
		class="com.ebay.jetstream.event.channel.messaging.InboundMessagingChannel">
		<property name="address" ref="InboundChannelAddress" />

		<property name="eventSinks">
			<list>
				<ref bean="EsperProcessor" />
			</list>
		</property>

	</bean>

        <bean id="InboundChannelAddress"
		class="com.ebay.jetstream.event.channel.messaging.MessagingChannelAddress">
		<property name="channelTopics">
			<list>
				<value>jetstream.demo/rawEvent1</value>

			</list>
		</property>
	</bean>

       
	<bean id="EsperProcessor" class="com.ebay.jetstream.event.processor.esper.EsperProcessor">
		<property name="esperEventListener" ref="EsperEventListener" />
		<property name="configuration" ref="EsperConfiguration" />
		<property name="epl" ref="EPL" />
		<property name="eventSinks">
			<list>
				<ref bean="ConsoleLogger" />
                                <ref bean="outboundMessageChannel" />
			</list>
		</property>
	</bean>

	
	<bean id="ConsoleLogger"
		class="com.ebay.jetstream.event.processor.console.ConsoleLoggingProcessor"></bean>

		
	<bean id="outboundMessageChanneBinder" class="com.ebay.jetstream.event.support.channel.ChannelBinding"
		depends-on="MessageService">
		<property name="channel" ref="outboundMessageChannel" />
	</bean>

	<bean id="outboundMessageChannel"
		class="com.ebay.jetstream.event.channel.messaging.OutboundMessagingChannel"
		depends-on="MessageService">
		<property name="address" ref="outboundMessageChannelAddress" />
	</bean>

	<bean id="outboundMessageChannelAddress"
		class="com.ebay.jetstream.event.channel.messaging.MessagingChannelAddress">
		<property name="channelTopics">
			<list>
				<value>jetstream.demo/rawEvent</value>
			</list>
		</property>
	</bean>
	
</beans>

Clone this wiki locally