[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 | |
---|
[77] | 134 | /** |
---|
[84] | 135 | * Set how many threads will be created to invoke remote methods |
---|
| 136 | */ |
---|
| 137 | public static String NUM_THREADS = "omq.num_threads"; |
---|
| 138 | |
---|
| 139 | /** |
---|
[83] | 140 | * Time in milis by default is set in a minute |
---|
[44] | 141 | */ |
---|
| 142 | public static long DEFAULT_TIMEOUT = 1 * 1000 * 60; |
---|
| 143 | |
---|
| 144 | } |
---|