@Override public Destination intercept(Destination destination) { return selectorAware ? new SelectorAwareVirtualTopicInterceptor(destination, this) : new VirtualTopicInterceptor(destination, this); }
@Override public void send(ProducerBrokerExchange context, Message message) throws Exception { if (!message.isAdvisory() && !(local && message.getBrokerPath() != null)) { ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination()); send(context, message, queueConsumers); } super.send(context, message); }
beginLocalTransaction(numDestinations, context.getConnectionContext(), message); try { if (concurrentSend && numDestinations > 1) { if (shouldDispatch(broker, message, dest)) { brokerService.getTaskRunnerFactory().execute(new Runnable() { @Override if (shouldDispatch(broker, message, dest)) { try { dest.send(context, copy(message, dest.getActiveMQDestination())); } catch (ResourceAllocationException e) { if (!dropMessageOnResourceLimit) { commit(localBrokerTransactionToCoalesceJournalSync, context.getConnectionContext(), message);
/** * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to * the virtual queues, hence there is no build up of unmatched messages on these destinations */ @Override protected boolean shouldDispatch(final Broker broker, Message message, Destination dest) throws IOException { //first validate that the prefix matches in the super class if (super.shouldDispatch(broker, message, dest)) { boolean matches = false; MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext(); msgContext.setDestination(dest.getActiveMQDestination()); msgContext.setMessageReference(message); List<Subscription> subs = dest.getConsumers(); for (Subscription sub : subs) { if (sub.matches(message, msgContext)) { matches = true; break; } } if (matches == false) { matches = tryMatchingCachedSubs(broker, dest, msgContext); } return matches; } return false; }
((org.apache.activemq.broker.region.Topic) dest).recoverRetroactiveMessages(connectionContext, subscription); } else if (dest instanceof VirtualTopicInterceptor) { ((VirtualTopicInterceptor) dest).getTopic().recoverRetroactiveMessages(connectionContext, subscription);
/** * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to * the virtual queues, hence there is no build up of unmatched messages on these destinations */ @Override protected boolean shouldDispatch(final Broker broker, Message message, Destination dest) throws IOException { //first validate that the prefix matches in the super class if (super.shouldDispatch(broker, message, dest)) { boolean matches = false; MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext(); msgContext.setDestination(dest.getActiveMQDestination()); msgContext.setMessageReference(message); List<Subscription> subs = dest.getConsumers(); for (Subscription sub : subs) { if (sub.matches(message, msgContext)) { matches = true; break; } } if (matches == false) { matches = tryMatchingCachedSubs(broker, dest, msgContext); } return matches; } return false; }
((org.apache.activemq.broker.region.Topic) dest).recoverRetroactiveMessages(connectionContext, subscription); } else if (dest instanceof VirtualTopicInterceptor) { ((VirtualTopicInterceptor) dest).getTopic().recoverRetroactiveMessages(connectionContext, subscription);
beginLocalTransaction(numDestinations, context.getConnectionContext(), message); try { if (concurrentSend && numDestinations > 1) { if (shouldDispatch(broker, message, dest)) { brokerService.getTaskRunnerFactory().execute(new Runnable() { @Override if (shouldDispatch(broker, message, dest)) { dest.send(context, copy(message, dest.getActiveMQDestination())); commit(localBrokerTransactionToCoalesceJournalSync, context.getConnectionContext(), message);
public void send(ProducerBrokerExchange context, Message message) throws Exception { if (!message.isAdvisory()) { ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination()); send(context, message, queueConsumers); } super.send(context, message); }
@Override public Destination intercept(Destination destination) { return selectorAware ? new SelectorAwareVirtualTopicInterceptor(destination, this) : new VirtualTopicInterceptor(destination, this); }
/** * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to * the virtual queues, hence there is no build up of unmatched messages on these destinations */ @Override protected boolean shouldDispatch(final Broker broker, Message message, Destination dest) throws IOException { //first validate that the prefix matches in the super class if (super.shouldDispatch(broker, message, dest)) { boolean matches = false; MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext(); msgContext.setDestination(dest.getActiveMQDestination()); msgContext.setMessageReference(message); List<Subscription> subs = dest.getConsumers(); for (Subscription sub : subs) { if (sub.matches(message, msgContext)) { matches = true; break; } } if (matches == false) { matches = tryMatchingCachedSubs(broker, dest, msgContext); } return matches; } return false; }
((org.apache.activemq.broker.region.Topic) dest).recoverRetroactiveMessages(connectionContext, subscription); } else if (dest instanceof VirtualTopicInterceptor) { ((VirtualTopicInterceptor) dest).getTopic().recoverRetroactiveMessages(connectionContext, subscription);
beginLocalTransaction(numDestinations, context.getConnectionContext(), message); try { if (concurrentSend && numDestinations > 1) { if (shouldDispatch(broker, message, dest)) { brokerService.getTaskRunnerFactory().execute(new Runnable() { @Override if (shouldDispatch(broker, message, dest)) { dest.send(context, copy(message, dest.getActiveMQDestination())); commit(localBrokerTransactionToCoalesceJournalSync, context.getConnectionContext(), message);
@Override public void send(ProducerBrokerExchange context, Message message) throws Exception { if (!message.isAdvisory() && !(local && message.getBrokerPath() != null)) { ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination()); send(context, message, queueConsumers); } super.send(context, message); }
@Override public Destination intercept(Destination destination) { return selectorAware ? new SelectorAwareVirtualTopicInterceptor(destination, this) : new VirtualTopicInterceptor(destination, this); }
/** * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to * the virtual queues, hence there is no build up of unmatched messages on these destinations */ @Override protected boolean shouldDispatch(final Broker broker, Message message, Destination dest) throws IOException { //first validate that the prefix matches in the super class if (super.shouldDispatch(broker, message, dest)) { boolean matches = false; MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext(); msgContext.setDestination(dest.getActiveMQDestination()); msgContext.setMessageReference(message); List<Subscription> subs = dest.getConsumers(); for (Subscription sub : subs) { if (sub.matches(message, msgContext)) { matches = true; break; } } if (matches == false) { matches = tryMatchingCachedSubs(broker, dest, msgContext); } return matches; } return false; }
beginLocalTransaction(numDestinations, context.getConnectionContext(), message); try { if (concurrentSend && numDestinations > 1) { if (shouldDispatch(broker, message, dest)) { brokerService.getTaskRunnerFactory().execute(new Runnable() { @Override if (shouldDispatch(broker, message, dest)) { dest.send(context, copy(message, dest.getActiveMQDestination())); commit(localBrokerTransactionToCoalesceJournalSync, context.getConnectionContext(), message);
@Override public void send(ProducerBrokerExchange context, Message message) throws Exception { if (!message.isAdvisory() && !(local && message.getBrokerPath() != null)) { ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination()); send(context, message, queueConsumers); } super.send(context, message); }
@Override public Destination intercept(Destination destination) { return selectorAware ? new SelectorAwareVirtualTopicInterceptor(destination, this) : new VirtualTopicInterceptor(destination, this); }
@Override public void send(ProducerBrokerExchange context, Message message) throws Exception { if (!message.isAdvisory() && !(local && message.getBrokerPath() != null)) { ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination()); send(context, message, queueConsumers); } super.send(context, message); }