- 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.xmlfile in the<TOMCAT_HOME_DIR>/confdirectory.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.propertiesfile in thefichome/realtime_processing/confdirectory: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>CNFNote:
Name should match the Resource Name defined in theserver.xmlfile. - Update the
$TOMCAT_HOME/webapps/ILP/conf/install.propertiesfile 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.propertiesfile in$TOMCAT_HOME/webapps/ILP/confdirectory after commenting out the parameterspring.profiles.active=JMS,JMSApplicationCache,JMSGateway,JMSFeedBackGa tewayand addingspring.profiles.active=IPEKAFKANote:
The preceding example changes will remove the JMS dependencies for IPE and enable Kafka. - Update the
web.xmlfile in the$TOMCAT_HOME/webapps/ILP/WEB-INFdirectory (append the,/conf/applicationContext-kafka.xmlfile 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/additionaljarsdirectory to thefichome/realtime_processing/WEB-INF/libdirectory:- 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.propertiesfile underconfigdirectory:num.partitions=200 auto.create.topics.enable=true - Execute the
ant.shscript to createilp.earandilp.warfiles from thefichome/realtime_processingdirectory. - Copy the
ilp.warfile to theTOMCAT_HOME/webappsdirectory. - Restart the Tomcat server to deploy
ilp.war.
Parent topic: Configuring IPE in Kafka