Ignore:
Timestamp:
06/21/13 16:55:58 (11 years ago)
Author:
stoda
Message:

@MultiMethod? implemented and working with @AsyncMethod? annotation.
TODO: @Multi with SyncMethod?(waitNum = x) -> Must return a List<?>
Refactoring in Proxymq if it's necessary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/server/RemoteObject.java

    r54 r55  
    223223                String queue = UID;
    224224                String routingKey = UID;
     225                // Multi info
     226                String multiExchange = multi + exchange;
     227                String multiQueue = UID + System.currentTimeMillis();
     228
    225229                boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false"));
    226230
     
    231235                logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue);
    232236                channel.exchangeDeclare(exchange, "direct");
    233                 channel.exchangeDeclare(multi + exchange, "fanout");
    234237                channel.queueDeclare(queue, durable, false, false, null);
    235238                channel.queueBind(queue, exchange, routingKey);
    236                 channel.queueBind(queue, multi + exchange, routingKey);
     239
     240                channel.exchangeDeclare(multiExchange, "fanout");
     241                channel.queueDeclare(multiQueue, durable, false, false, null);
     242                channel.queueBind(multiQueue, multiExchange, "");
    237243
    238244                // Declare the event topic fanout
     
    243249                consumer = new QueueingConsumer(channel);
    244250                channel.basicConsume(queue, true, consumer);
     251                channel.basicConsume(multiQueue, true, consumer);
    245252        }
    246253
Note: See TracChangeset for help on using the changeset viewer.