public void createConsumer(final long consumerID,
final SimpleString queueName,
final SimpleString filterString,
final boolean browseOnly) throws Exception
{
Binding binding = postOffice.getBinding(queueName);
if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE)
{
throw new HornetQException(HornetQException.QUEUE_DOES_NOT_EXIST, "Queue " + queueName + " does not exist");
}
securityStore.check(binding.getAddress(), CheckType.CONSUME, this);
Filter filter = FilterImpl.createFilter(filterString);
ServerConsumer consumer = new ServerConsumerImpl(consumerID,
this,
(QueueBinding)binding,
filter,
started,
browseOnly,
storageManager,
callback,
preAcknowledge,
strictUpdateDeliveryCount,
managementService);
consumers.put(consumer.getID(), consumer);
if (!browseOnly)
{
TypedProperties props = new TypedProperties();
props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, binding.getAddress());
props.putSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME, binding.getClusterName());
props.putSimpleStringProperty(ManagementHelper.HDR_ROUTING_NAME, binding.getRoutingName());
props.putIntProperty(ManagementHelper.HDR_DISTANCE, binding.getDistance());
Queue theQueue = (Queue)binding.getBindable();
props.putIntProperty(ManagementHelper.HDR_CONSUMER_COUNT, theQueue.getConsumerCount());
if (filterString != null)
{