Line | |
---|
1 | package stopBroker; |
---|
2 | |
---|
3 | import java.util.Properties; |
---|
4 | |
---|
5 | import omq.common.broker.Broker; |
---|
6 | import omq.common.util.ParameterQueue; |
---|
7 | import omq.common.util.Serializer; |
---|
8 | |
---|
9 | public class ServerTest { |
---|
10 | |
---|
11 | /** |
---|
12 | * @param args |
---|
13 | */ |
---|
14 | public static void main(String[] args) throws Exception { |
---|
15 | Properties env = new Properties(); |
---|
16 | env.setProperty(ParameterQueue.USER_NAME, "guest"); |
---|
17 | env.setProperty(ParameterQueue.USER_PASS, "guest"); |
---|
18 | |
---|
19 | // Get host info of rabbimq (where it is) |
---|
20 | env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1"); |
---|
21 | env.setProperty(ParameterQueue.SERVER_PORT, "5672"); |
---|
22 | env.setProperty(ParameterQueue.DURABLE_QUEUES, "false"); |
---|
23 | env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java); |
---|
24 | env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false"); |
---|
25 | |
---|
26 | // Set info about where the message will be sent |
---|
27 | env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange"); |
---|
28 | env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000"); |
---|
29 | |
---|
30 | BrokerKillerImpl bki = new BrokerKillerImpl(); |
---|
31 | |
---|
32 | Broker.initBroker(env); |
---|
33 | Broker.bind("bk", bki); |
---|
34 | } |
---|
35 | |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.