ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
return ((Queue)destination).moveMatchingMessagesTo(context, selector, toDestination);
}
public int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception {
ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
return ((Queue)destination).moveMatchingMessagesTo(context, selector, toDestination, maximumMessages);
}