-
Notifications
You must be signed in to change notification settings - Fork 31
InboundRESTChannel
shmurthy62 edited this page Mar 16, 2015
·
4 revisions
InboundRESTChannel is a specialized Inbound Channel implementation for receiving events over a REST interface. Each InboundRESTChannel binds to a TCP port. Producers can post events to the endpoint using the following URL - http://<hostname>:<port>/RTBDEventConsumerServlet. The payload must be a list of json documents as shown below.
However you can add your own servlet and provide a path for accessing the servlet in the "servletDefinitions" section shown below.
InboundRESTChannel's bean specification is as shown below
<bean id="InboundRESTChannelBinder" scope="singleton" class="com.ebay.jetstream.event.support.channel.ChannelBinding">
<property name="channel" ref="InboundRESTEvents">
</property>
</bean>
<bean id="InboundRESTEvents" class="com.ebay.jetstream.event.channel.messaging.http.inbound.InboundRESTChannel">
<property name="server" ref="NettyHttpServer" />
<property name="eventSinks">
<list>
</list>
</property>
</bean>
<bean id="NettyHttpServer" class="com.ebay.jetstream.http.netty.server.HttpServer">
<property name="serverConfig" ref="NettyHttpServerConfig" />
</bean>
<bean id="NettyHttpServerConfig" class="com.ebay.jetstream.http.netty.server.HttpServerConfig">
<property name="port" value="15999" />
<property name="maxWorkQueueSz" value="10000" />
<property name="servletExecutorThreads" value="1" />
<property name="numIOWorkers" value="2" />
<property name="servletDefinitions">
<list>
<bean class="com.ebay.jetstream.servlet.ServletDefinition">
<property name="servletClass"
value="com.ebay.jetstream.management.PingServlet" />
<property name="urlPath" value="/ecv" />
</bean>
</list>
</property>
</bean>