Ignore:
Timestamp:
07/04/13 16:45:14 (11 years ago)
Author:
stoda
Message:

ParameterQueues? changed, added some properties to modify the queues

File:
1 edited

Legend:

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

    r75 r77  
    218218                String queue = UID;
    219219                String routingKey = UID;
     220
    220221                // Multi info
    221222                String multiExchange = multi + UID;
     223                if (env.getProperty(ParameterQueue.MULTI_QUEUE_NAME) != null) {
     224                        multiQueue = env.getProperty(ParameterQueue.MULTI_QUEUE_NAME);
     225                }
    222226
    223227                boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false"));
     228                boolean exclusive = Boolean.parseBoolean(env.getProperty(ParameterQueue.EXCLUSIVE_QUEUE, "false"));
     229                boolean autoDelete = Boolean.parseBoolean(env.getProperty(ParameterQueue.AUTO_DELETE_QUEUE, "false"));
    224230
    225231                // Start channel
     
    227233
    228234                // Declares and bindings
    229                 logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue + ", Durable: " + durable);
     235                logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue + ", Durable: " + durable + ", Exclusive: "
     236                                + exclusive + ", AutoDelete: " + autoDelete);
    230237                channel.exchangeDeclare(exchange, "direct");
    231                 channel.queueDeclare(queue, durable, false, false, null);
     238                channel.queueDeclare(queue, durable, exclusive, autoDelete, null);
    232239                channel.queueBind(queue, exchange, routingKey);
    233240
    234                 logger.info("RemoteObject: " + UID + " declaring fanout exchange: " + multiExchange + ", Queue: " + multiQueue + ", Durable: " + durable);
     241                logger.info("RemoteObject: " + UID + " declaring fanout exchange: " + multiExchange + ", Queue: " + multiQueue + ", Durable: " + durable
     242                                + ", Exclusive: " + exclusive + ", AutoDelete: " + autoDelete);
    235243                channel.exchangeDeclare(multiExchange, "fanout");
    236                 channel.queueDeclare(multiQueue, durable, false, false, null);
     244                channel.queueDeclare(multiQueue, durable, exclusive, autoDelete, null);
    237245                channel.queueBind(multiQueue, multiExchange, "");
    238246
Note: See TracChangeset for help on using the changeset viewer.