Merge branch 'master' into notification-service
[platform/upstream/iotivity.git] / cloud / messagequeue / README
1 This project contains the Message Queue(MQ) Broker code.
2
3 Build and Run
4
5 1) Install Apache Maven if you don't have it
6
7     http://maven.apache.org
8
9 2) Install Apache Kafka if you don't have it
10
11     http://kafka.apache.org/downloads.html
12
13     Set 'host.name' in Kafka server configuration file to your ip address,
14       Run Zookeeper server and Kafka broker with the configuration file.
15
16 3) Build a CloudStack. If you are building first time, then build the stack.
17
18     go to "stack" folder in root directory
19     $ mvn install -Dmaven.test.skip=true
20
21 4) Build a .jar file
22
23     $ mvn install -Dmaven.test.skip=true
24
25     - The CloudMessageQueue-0.0.1-SNAPSHOT.jar file will be placed in the "target" folder
26
27 5) Run .jar file
28
29     go to "target" folder
30     $ java -jar CloudMessageQueue-0.0.1-SNAPSHOT.jar arg1(MQ CoAP Server Port) 
31       arg2(Zookeeper server address) arg3(Zookeeper server port)
32       arg4(kafka server address) arg5(kafka server port) arg6(TLS mode required)
33
34     e.g java -jar CloudMessageQueue-0.0.1-SNAPSHOT.jar 5686 127.0.0.1 2181 127.0.0.1 9092 0
35
36     - Before running a MQ Broker, you should run Zookeeper server and Kafka broker first.
37     - If you want to operate on TLS mode, "CLOUD_CERT_FILE(iotivitycloud.crt)", "CLOUD_KEY_FILE(iotivitycloud.key)"
38       and ROOT_CERT_FILE(rootca.crt) files should be placed in the "target" folder.