[44] | 1 | package omq.common.util; |
---|
| 2 | |
---|
| 3 | /** |
---|
[83] | 4 | * This class is used to create new environments. |
---|
[44] | 5 | * |
---|
| 6 | * @author Sergi Toda <sergi.toda@estudiants.urv.cat> |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | public class ParameterQueue { |
---|
| 10 | |
---|
[84] | 11 | /* |
---|
| 12 | * Connection info |
---|
| 13 | */ |
---|
| 14 | |
---|
[77] | 15 | /** |
---|
[84] | 16 | * Set the clients username |
---|
[77] | 17 | */ |
---|
[84] | 18 | public static String USER_NAME = "omq.username"; |
---|
[44] | 19 | |
---|
| 20 | /** |
---|
[84] | 21 | * Set the clients password |
---|
[44] | 22 | */ |
---|
[84] | 23 | public static String USER_PASS = "omq.pass"; |
---|
[44] | 24 | |
---|
| 25 | /** |
---|
| 26 | * Set the ip where the rabbitmq server is. |
---|
| 27 | */ |
---|
[77] | 28 | public static String RABBIT_HOST = "omq.host"; |
---|
[44] | 29 | |
---|
| 30 | /** |
---|
| 31 | * Set the port that rabbitmq uses. |
---|
| 32 | */ |
---|
[77] | 33 | public static String RABBIT_PORT = "omq.port"; |
---|
[44] | 34 | |
---|
| 35 | /** |
---|
[84] | 36 | * Set if the system will use ssl |
---|
[44] | 37 | */ |
---|
[84] | 38 | public static String ENABLE_SSL = "omq.enable_ssl"; |
---|
[44] | 39 | |
---|
| 40 | /** |
---|
[84] | 41 | * Set how many time we have to wait to retry the connection with the server |
---|
| 42 | * when this goes down |
---|
[44] | 43 | */ |
---|
[84] | 44 | public static String RETRY_TIME_CONNECTION = "omq.retry_connection"; |
---|
[44] | 45 | |
---|
[84] | 46 | /* |
---|
| 47 | * Queues info |
---|
| 48 | */ |
---|
| 49 | |
---|
[44] | 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 | /** |
---|
[84] | 62 | * Set the specific name of a multi queue in a specific object |
---|
[44] | 63 | */ |
---|
[84] | 64 | public static String MULTI_QUEUE_NAME = "omq.multi_queue_name"; |
---|
[44] | 65 | |
---|
| 66 | /** |
---|
[84] | 67 | * Set if a queue must be durable. The queue won't be lost when RabbitMQ |
---|
| 68 | * crashes if DURABLE_QUEUE is set true. |
---|
[44] | 69 | */ |
---|
[84] | 70 | public static String DURABLE_QUEUE = "omq.durable_queue"; |
---|
[44] | 71 | |
---|
[77] | 72 | /** |
---|
[84] | 73 | * Set if server will delete a queue when is no longer in use |
---|
[77] | 74 | */ |
---|
[84] | 75 | public static String AUTO_DELETE_QUEUE = "omq.auto_delete"; |
---|
[44] | 76 | |
---|
[77] | 77 | /** |
---|
[84] | 78 | * Set if we are declaring an exclusive queue (restricted to this |
---|
| 79 | * connection) |
---|
[77] | 80 | */ |
---|
[84] | 81 | public static String EXCLUSIVE_QUEUE = "omq.exclusive_queue"; |
---|
[44] | 82 | |
---|
[77] | 83 | /** |
---|
[84] | 84 | * Set if a queue must be durable. The queue won't be lost when RabbitMQ |
---|
| 85 | * crashes if DURABLE_QUEUE is set true. |
---|
[44] | 86 | */ |
---|
[84] | 87 | public static String DURABLE_MQUEUE = "omq.durable_mqueue"; |
---|
[44] | 88 | |
---|
[77] | 89 | /** |
---|
| 90 | * Set if server will delete a queue when is no longer in use |
---|
| 91 | */ |
---|
[84] | 92 | public static String AUTO_DELETE_MQUEUE = "omq.auto_mdelete"; |
---|
[44] | 93 | |
---|
[77] | 94 | /** |
---|
| 95 | * Set if we are declaring an exclusive queue (restricted to this |
---|
| 96 | * connection) |
---|
| 97 | */ |
---|
[84] | 98 | public static String EXCLUSIVE_MQUEUE = "omq.exclusive_mqueue"; |
---|
[44] | 99 | |
---|
| 100 | /** |
---|
[84] | 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 | /** |
---|
[77] | 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 | |
---|
[84] | 130 | /* |
---|
| 131 | * ObjectMQ info |
---|
| 132 | */ |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | /** |
---|
[101] | 136 | * Set the minimum number of threads in a pool |
---|
| 137 | */ |
---|
| 138 | public static String MIN_POOL_THREADS = "omq.min_num_threads"; |
---|
| 139 | |
---|
| 140 | /** |
---|
| 141 | * Set the maximum number of threads in a pool |
---|
| 142 | */ |
---|
| 143 | public static String MAX_POOL_THREADS = "omq.max_num_threads"; |
---|
| 144 | |
---|
| 145 | /** |
---|
| 146 | * Set the refresh time to see how many messages are on the queue |
---|
| 147 | */ |
---|
| 148 | public static String POOL_REFRESH_TIME = "omq.refresh_time"; |
---|
| 149 | |
---|
| 150 | /** |
---|
| 151 | * Set the maximum number of threads in a pool |
---|
| 152 | */ |
---|
| 153 | public static String KEEP_ALIVE_TIME = "omq.keep_alive_time"; |
---|
| 154 | |
---|
| 155 | /** |
---|
| 156 | * Set the maximum number of messages per thread to create a new one |
---|
| 157 | */ |
---|
| 158 | public static String MAX_MESSAGES_PER_THREAD = "omq.max_messages_per_thread"; |
---|
| 159 | |
---|
| 160 | /** |
---|
[83] | 161 | * Time in milis by default is set in a minute |
---|
[44] | 162 | */ |
---|
| 163 | public static long DEFAULT_TIMEOUT = 1 * 1000 * 60; |
---|
| 164 | |
---|
| 165 | } |
---|