/** * Creates a <CODE>QueueReceiver</CODE> object to receive messages from * the specified queue using a message selector. * * @param queue the <CODE>Queue</CODE> to access * @param messageSelector only messages with properties matching the message * selector expression are delivered. A value of null or an * empty string indicates that there is no message selector * for the message consumer. * @return QueueReceiver * @throws JMSException if the session fails to create a receiver due to * some internal error. * @throws InvalidDestinationException if an invalid queue is specified. * @throws InvalidSelectorException if the message selector is invalid. */ @Override public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createReceiver(this, messageSelector); } ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy(); return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch); }
/** * Creates a <CODE>QueueReceiver</CODE> object to receive messages from * the specified queue using a message selector. * * @param queue the <CODE>Queue</CODE> to access * @param messageSelector only messages with properties matching the message * selector expression are delivered. A value of null or an * empty string indicates that there is no message selector * for the message consumer. * @return QueueReceiver * @throws JMSException if the session fails to create a receiver due to * some internal error. * @throws InvalidDestinationException if an invalid queue is specified. * @throws InvalidSelectorException if the message selector is invalid. */ @Override public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createReceiver(this, messageSelector); } ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy(); return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch); }
/** * Creates a <CODE>QueueReceiver</CODE> object to receive messages from * the specified queue using a message selector. * * @param queue the <CODE>Queue</CODE> to access * @param messageSelector only messages with properties matching the message * selector expression are delivered. A value of null or an * empty string indicates that there is no message selector * for the message consumer. * @return QueueReceiver * @throws JMSException if the session fails to create a receiver due to * some internal error. * @throws InvalidDestinationException if an invalid queue is specified. * @throws InvalidSelectorException if the message selector is invalid. */ public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createReceiver(this, messageSelector); } ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy(); return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch); }
/** * Creates a <CODE>QueueReceiver</CODE> object to receive messages from * the specified queue using a message selector. * * @param queue the <CODE>Queue</CODE> to access * @param messageSelector only messages with properties matching the message * selector expression are delivered. A value of null or an * empty string indicates that there is no message selector * for the message consumer. * @return QueueReceiver * @throws JMSException if the session fails to create a receiver due to * some internal error. * @throws InvalidDestinationException if an invalid queue is specified. * @throws InvalidSelectorException if the message selector is invalid. */ @Override public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createReceiver(this, messageSelector); } ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy(); return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch); }
/** * Creates a <CODE>QueueReceiver</CODE> object to receive messages from * the specified queue using a message selector. * * @param queue the <CODE>Queue</CODE> to access * @param messageSelector only messages with properties matching the message * selector expression are delivered. A value of null or an * empty string indicates that there is no message selector * for the message consumer. * @return QueueReceiver * @throws JMSException if the session fails to create a receiver due to * some internal error. * @throws InvalidDestinationException if an invalid queue is specified. * @throws InvalidSelectorException if the message selector is invalid. */ @Override public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException { checkClosed(); if (queue instanceof CustomDestination) { CustomDestination customDestination = (CustomDestination)queue; return customDestination.createReceiver(this, messageSelector); } ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy(); return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch); }