Skip to content

Outbound File Channel

rmuthupandian edited this page Feb 11, 2015 · 1 revision

OutboundFileChannel is a specialized Jetstream OutboundChannel. It can be used to record events in CSV file for replaying later.

OutboundFileChannel bean definition

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

	<bean id="outboundFileChannel"
		class="com.ebay.jetstream.event.channel.file.OutboundFileChannel" >
		<property name="streamTypeToAddressMap">
			<!--  streamtype to address map -->
			<map>
				<entry key="RTDBLK_IP_STREAM" value-ref="BLKFileChannelAddress" />
				<entry key="RTD" value-ref="FileChannelAddress" />
			</map>
		</property>
	</bean>

	<bean id="RTDBLKFileChannelAddress"
		class="com.ebay.jetstream.event.channel.file.CSVFileChannelAddress">
		<property name="pathname" value="c:/temp/download_rtdblk.txt"/>
		<!-- default is Long.MAX. if non-positive number is specified, default is used -->
		<property name="maxNumberOfRecords" value="102400" />
		<property name="keepReservedKeys" value="false" />
		<!-- ColumnNameArray is optional. default: all non-reserved keys will be extracted and recorded -->
		<!--  
		<property name="ColumnNameArray">
			<list>							
				<value>ip</value>
				<value>cguid</value>
				<value>uid</value>
			</list>
		</property>
		-->
	</bean>
	<bean id="FileChannelAddress"
		class="com.ebay.jetstream.event.channel.file.CSVFileChannelAddress">
		<property name="pathname" value="c:/temp/download_rtd.txt"/>
		<!-- default is false: to remove those jetstream reserved keys from events -->
		<property name="keepReservedKeys" value="true" />
		<!-- ColumnNameArray is optional. default: all non-reserved keys will be extracted -->
		<!-- 
		<property name="ColumnNameArray">
			<list>							
				<value>ip</value>
				<value>cguid</value>
				<value>uid</value>
				<value>cost</value>
			</list>
		</property>
		-->
	</bean>
Clone this wiki locally