Changeset 55 for trunk/src/main/java/omq/client/proxy
- Timestamp:
- 06/21/13 16:55:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/client/proxy/Proxymq.java
r54 r55 48 48 private static final long serialVersionUID = 1L; 49 49 private static final Logger logger = Logger.getLogger(Proxymq.class.getName()); 50 private static final String multi = "multi#"; 50 51 private static Map<String, Object> proxies = new Hashtable<String, Object>(); 51 52 … … 56 57 private transient EventDispatcher dispatcher; 57 58 private transient Serializer serializer; 58 // private transient Channel channel;59 59 private transient Properties env; 60 60 private transient Map<String, byte[]> results; … … 111 111 @Override 112 112 public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable { 113 // long timeStart = (new Date()).getTime();114 115 113 // Local methods only 116 114 String methodName = method.getName(); … … 151 149 152 150 // Get the environment properties 153 String exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE); 154 String routingkey = this.uid; 151 String exchange; 152 String routingkey; 153 154 if (request.isMulti()) { 155 exchange = multi + env.getProperty(ParameterQueue.RPC_EXCHANGE); 156 routingkey = ""; 157 } else { 158 exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE); 159 routingkey = uid; 160 } 155 161 156 162 // Add the correlation ID and create a replyTo property … … 159 165 // Publish the message 160 166 byte[] bytesRequest = serializer.serialize(serializerType, request); 161 // TODO See this162 // channel.basicPublish(exchange, routingkey, props, bytesRequest);163 167 broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest); 164 168 } … … 213 217 timeout = sync.timeout(); 214 218 } 215 return Request.newSyncRequest(corrId, methodName, arguments, retries, timeout );219 return Request.newSyncRequest(corrId, methodName, arguments, retries, timeout, multi); 216 220 } else { 217 221 return Request.newAsyncRequest(corrId, methodName, arguments, multi);
Note: See TracChangeset
for help on using the changeset viewer.