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