-
Notifications
You must be signed in to change notification settings - Fork 31
Get Set Run
Now how to run this app:
-
In Run->Run Configurations, create new Java Application instance whose main class is com.ebay.jetstream.application.JetstreamApplication.
Project: publisher -
Under Arguments tab, specify management port, app name, app config version for the app as follows in Program arguments:
-n <appname> -cv <configversion> –p <management port>
for example-p 9999 -n publisher -cv 1.0
. -
set vm arguments to
-server -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Xmn50m -Xmx1200m
-
Under Environment tab, setup new
- Variable: JETSTREAM_HOME
- Value: buildsrc (This is the parent directory of JetStreamConf)
Follow the 4 steps for both the projects. Run both the apps on different port number in step2.
Run Subscriber first and then Publisher. This is to avoid the published events if the publisher is started before.
The jetstreamdemo have been dockerized, and it is super easy to run it on docker.
- cd to jetstreamdemo
- mvn clean install
- sudo docker build -t jetstreamdemo/publisher publisher
- sudo docker build -t jetstreamdemo/subscriber subscriber
- sudo docker run -d --name zkserver -t "pulsar/zookeeper"
- sudo docker run -d -p 0.0.0.0:7001:9999 --link zkserver:zkserver -t "jetstreamdemo/subscriber"
- sudo docker run -d -p 0.0.0.0:7002:9999 --link zkserver:zkserver -t "jetstreamdemo/publisher"
- pulsar/zookeeper is a docker image for zookeeper.