- Inline Processing Engine Configuration Guide
- Configuring IPE in Web Application Servers for Real Time Mode
- Configuring IPE in Kafka
- Configuring Kafka
4.4.2 Configuring Kafka
Perform the following procedure to configure Kafka:
- Create the datasource for ILP context in Tomcat by editing the
server.xml
file in the<TOMCAT_HOME_DIR>/conf
directory.Note:
The following example is a sample configuration. Update your database details accordingly. Make sure the context name matches the directory name under webapps. In the following example, ILP is the context name.<Context path="/ILP" docBase="/scratch/ofsaobie/apache-tomcat- 8.0.21/webapps/ILP" debug="0" reloadable="false" crossContext="true"> <Loader delegate="true"/> <Resource auth="Container" name="jdbc/FICMASTER" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="act_obiconf" password="password" url="jdbc:oracle:thin:@whf00aqr:1521/DEVUT08SPRINT" maxTotal="100" maxIdle="30" maxWaitMillis="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"/> <Resource auth="Container" name="jdbc/OFSAAAIINFO" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="act_obiatm" password="password" url="jdbc:oracle:thin:@whf00aqr:1521/DEVUT08SPRINT" maxTotal="100" maxIdle="30" maxWaitMillis="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"/> <Resource auth="Container" name="jdbc/OFSAAAIINFOCNF" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="act_obiatm" password="password" url="jdbc:oracle:thin:@whf00aqr:1521/DEVUT08SPRINT" maxTotal="100" maxIdle="30" maxWaitMillis="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"/> </Context>
- Update the following parameters in the
install.properties
file in thefichome/realtime_processing/conf
directory:sql.config.datasource.jndi.name=java:comp/env/jdbc/FICMASTER sql.atomic.datasource.jndi.name=java:comp/env/jdbc/<RTI_INFODOM> sql.metadom.datasource.jndi.name=java:comp/env/jdbc/<RTI_INFODOM>CNF
Note:
Name should match the Resource Name defined in theserver.xml
file. - Update the
$TOMCAT_HOME/webapps/ILP/conf/install.properties
file for kafka broker details, the inbound topic names, and outbound topic names as shown in the following example:kafka.bootstrap-servers=whf00act.in.oracle.com:9092 kafka.inbound.topic.group.id=IPE kafka.inbound.topic=IPERT.t kafka.outbound.topic=IPERESPONSE.t kafka.consumer.num=5 kafka.inbound.partitions=10 kafka.inbound.poll.timeout=3000
- Update the
application-env.properties
file in$TOMCAT_HOME/webapps/ILP/conf
directory after commenting out the parameterspring.profiles.active=JMS,JMSApplicationCache,JMSGateway,JMSFeedBackGa teway
and addingspring.profiles.active=IPEKAFKA
Note:
The preceding example changes will remove the JMS dependencies for IPE and enable Kafka. - Update the
web.xml
file in the$TOMCAT_HOME/webapps/ILP/WEB-INF
directory (append the,/conf/applicationContext-kafka.xml
file in the end under param contextConfigLocation)./conf/applicationContext.xml,/conf/applicationContext- jms.xml,/conf/applicationContext- jmx.xml,/conf/ext/spring*.xml,/conf/applicationContext-kafka.xml
- Copy the following jars from the
fichome/realtime_processing/additionaljars
directory to thefichome/realtime_processing/WEB-INF/lib
directory:- spring-messaging-4.2.3.RELEASE.jar
- spring-kafka-1.2.0.RELEASE.jar
- spring-integration-kafka-2.0.1.RELEASE.jar
- kafka-clients-0.11.0.0.jar
- slf4j-log4j12-1.4.3.jar
- slf4j-api-1.4.3.jar
- jms-api-1.1-rev-1.jar
- javax.ws.rs-api-2.0.1.jar
- Update the following in the
server.properties
file underconfig
directory:num.partitions=200 auto.create.topics.enable=true
- Execute the
ant.sh
script to createilp.ear
andilp.war
files from thefichome/realtime_processing
directory. - Copy the
ilp.war
file to theTOMCAT_HOME/webapps
directory. - Restart the Tomcat server to deploy
ilp.war
.
Parent topic: Configuring IPE in Kafka