}
}
void createSubscriptionQueue(AMQDestination dest, boolean noLocal, String messageSelector) throws AMQException
{
Link link = dest.getLink();
String queueName = dest.getQueueName();
if (queueName == null)
{
queueName = link.getName() == null ? "TempQueue" + UUID.randomUUID() : link.getName();
dest.setQueueName(new AMQShortString(queueName));
}
SubscriptionQueue queueProps = link.getSubscriptionQueue();
Map<String,Object> arguments = queueProps.getDeclareArgs();
if (!arguments.containsKey((AddressHelper.NO_LOCAL)))
{
arguments.put(AddressHelper.NO_LOCAL, noLocal);
}
if (link.isDurable() && queueName.startsWith("TempQueue"))
{
throw new AMQException("You cannot mark a subscription queue as durable without providing a name for the link.");
}
getQpidSession().queueDeclare(queueName,
queueProps.getAlternateExchange(), arguments,
queueProps.isAutoDelete() ? Option.AUTO_DELETE : Option.NONE,
link.isDurable() ? Option.DURABLE : Option.NONE,
queueProps.isExclusive() ? Option.EXCLUSIVE : Option.NONE);
Map<String,Object> bindingArguments = new HashMap<String, Object>();
bindingArguments.put(AMQPFilterTypes.JMS_SELECTOR.getValue().toString(), messageSelector == null ? "" : messageSelector);
getQpidSession().exchangeBind(queueName,