source: trunk/src/main/java/omq/common/util/ParameterQueue.java

Last change on this file was 84, checked in by stoda, 11 years ago

Default queues added, default exchange enabled, more control in remote queues added.
Tests verified and changed Persistent test to show how to make persistent messages.

File size: 3.3 KB
Line 
1package omq.common.util;
2
3/**
4 * This class is used to create new environments.
5 *
6 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
7 *
8 */
9public class ParameterQueue {
10
11        /*
12         * Connection info
13         */
14
15        /**
16         * Set the clients username
17         */
18        public static String USER_NAME = "omq.username";
19
20        /**
21         * Set the clients password
22         */
23        public static String USER_PASS = "omq.pass";
24
25        /**
26         * Set the ip where the rabbitmq server is.
27         */
28        public static String RABBIT_HOST = "omq.host";
29
30        /**
31         * Set the port that rabbitmq uses.
32         */
33        public static String RABBIT_PORT = "omq.port";
34
35        /**
36         * Set if the system will use ssl
37         */
38        public static String ENABLE_SSL = "omq.enable_ssl";
39
40        /**
41         * Set how many time we have to wait to retry the connection with the server
42         * when this goes down
43         */
44        public static String RETRY_TIME_CONNECTION = "omq.retry_connection";
45
46        /*
47         * Queues info
48         */
49
50        /**
51         * Set the exchange where the objectmq are listening
52         */
53        public static String RPC_EXCHANGE = "omq.rpc_exchange";
54
55        /**
56         * Set the clients reply queue. Every client must have a different queue
57         * name.
58         */
59        public static String RPC_REPLY_QUEUE = "omq.reply_queue_rpc";
60
61        /**
62         * Set the specific name of a multi queue in a specific object
63         */
64        public static String MULTI_QUEUE_NAME = "omq.multi_queue_name";
65
66        /**
67         * Set if a queue must be durable. The queue won't be lost when RabbitMQ
68         * crashes if DURABLE_QUEUE is set true.
69         */
70        public static String DURABLE_QUEUE = "omq.durable_queue";
71
72        /**
73         * Set if server will delete a queue when is no longer in use
74         */
75        public static String AUTO_DELETE_QUEUE = "omq.auto_delete";
76
77        /**
78         * Set if we are declaring an exclusive queue (restricted to this
79         * connection)
80         */
81        public static String EXCLUSIVE_QUEUE = "omq.exclusive_queue";
82
83        /**
84         * Set if a queue must be durable. The queue won't be lost when RabbitMQ
85         * crashes if DURABLE_QUEUE is set true.
86         */
87        public static String DURABLE_MQUEUE = "omq.durable_mqueue";
88
89        /**
90         * Set if server will delete a queue when is no longer in use
91         */
92        public static String AUTO_DELETE_MQUEUE = "omq.auto_mdelete";
93
94        /**
95         * Set if we are declaring an exclusive queue (restricted to this
96         * connection)
97         */
98        public static String EXCLUSIVE_MQUEUE = "omq.exclusive_mqueue";
99
100        /**
101         * The MESSAGE_TTL_IN_QUEUES controls for how long a message published to
102         * the queues can live before it is discarded. A message that has been in
103         * the queue for longer than the configured TTL is said to be dead.
104         *
105         * This property must be a non-negative 32 bit integer (0 <= n <= 2^32-1),
106         * describing the TTL period in milliseconds.
107         */
108        public static String MESSAGE_TTL_IN_QUEUES = "omq.message_ttl_queue";
109
110        /*
111         * Message info
112         */
113
114        /**
115         * Set the proxy's serializer method
116         */
117        public static String PROXY_SERIALIZER = "omq.serializer";
118
119        /**
120         * Set whether the messages must be compressed or not
121         */
122        public static String ENABLE_COMPRESSION = "omq.compression";
123
124        /**
125         * Set 1 to indicate the message will be nonpersistent and 2 to indicate it
126         * will be persistent
127         */
128        public static String DELIVERY_MODE = "omq.delivery_mode";
129
130        /*
131         * ObjectMQ info
132         */
133
134        /**
135         * Set how many threads will be created to invoke remote methods
136         */
137        public static String NUM_THREADS = "omq.num_threads";
138
139        /**
140         * Time in milis by default is set in a minute
141         */
142        public static long DEFAULT_TIMEOUT = 1 * 1000 * 60;
143
144}
Note: See TracBrowser for help on using the repository browser.