-
Notifications
You must be signed in to change notification settings - Fork 2
/
README_dist.txt
66 lines (44 loc) · 3.03 KB
/
README_dist.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
This is a sample code to run a JMS client and receive messages on a subscription channel.
To use it:
==========
1. unzip the file jmsclient-${project.version}.zip
2. using the VSD GUI, add a user eg: jmsclient to the 'csp' organization.
3. add this user and password to the jmsclient.properties file or whatever file used with the -Dprop_file command line
option:
jms_username = jmsclient@csp # since in step 2 above, 'jmsclient' was added to the csp organizaion.
jms_password = <the password for the user>
4. Make sure port 61616 is open in iptables for this client machine
ipset add vsd <ip address of the JMS client machine>
5. Next change directory to:
jmsclient-${project.version}
and run:
6. ./runjmsclient.sh [-durable|-queue] [-Dproperty.file=propertyfile] [-Dlog.file.path=logfile_directory] [-Dlog.file=logfilename] h1_or_ip1[,h2_or_ip2,h3_or_ip3] [jms port]
The only mandatory argument is the JMS Server host name or ip.
When connecting to a VSD cluster, the client must specify all the JMS Server host names or IP addresses
in the format : h1_or_ip1,h2_or_ip2,h3_or_ip3
The client would automatically connect to the master JMS server.
-durable : to establish durable connection
-queue : to establish a connection to a JMS queue
default jms_port : 61616
default property.file : <script directory>/jmsclient.properties
The property.file contains JMS client parameters such as user name, password, any topic filters etc.
default log.file.path : <script directory>/log
default log.file : jmsclient.log
default client.id : random uuid
default client.name : DurableJMSTopicClient. client name is used only if the connection is durable
if log.file.path property option is not specified, the default is the 'log' subdirectory of this script directory.
if log.file property option is not specified, the default log file name is jmsclient.log. The log file is created in
the directory specified by the log.file.path property.
If you want to use the filter version
=====================================
./runjmsclient.sh <other options> -Dproperty.file=jmsfilter.properties <host_or_ip_list>
Setting log level
=================
The log level of messages written to jmsclient.log can be modified even when the program is running by running this script as below.
./setLogLevel.sh -l <LOG LEVEL> [component]
LOG LEVEL is one of WARN, DEBUG, INFO
component is one of all or client
when component is 'client', only the log level of client code is set
when component is 'all', the log level of client as well as the root logger are set. When the log level of root logger is set to for example DEBUG, detailed messages from low level libraries will also be output.
Note:
The durable version requires a unique client name and client id to identify the connection. Thus in order for the client to receive messages that were published when the client had abnormally terminated, the same connection id and connection name must be used. This also means that two simultaneous durable client connections to the same topic MUST use a different client.id and client.name.