}
private CreateConsumerResponse processCreateConsumer( CreateConsumerQuery query ) throws JMSException
{
LocalSession session = lookupSession(query);
LocalMessageConsumer consumer = (LocalMessageConsumer)session.createConsumer(query.getConsumerId(),
query.getDestination(),
query.getMessageSelector(),
query.isNoLocal());
// Start prefetching if we are receiving from a queue
if (query.getDestination() instanceof Queue)
consumer.prefetchMore();
CreateConsumerResponse response = new CreateConsumerResponse();
response.setPrefetchSize(consumer.getPrefetchSize());
return response;
}