@Override public boolean isDisposed() { return next.isDisposed(); }
if (destination.isDisposed()) { disposed.add(destination); continue;
@Override public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception { ActiveMQDestination destination = message.getDestination(); message.setBrokerInTime(System.currentTimeMillis()); if (producerExchange.isMutable() || producerExchange.getRegion() == null || (producerExchange.getRegionDestination() != null && producerExchange.getRegionDestination().isDisposed())) { // ensure the destination is registered with the RegionBroker producerExchange.getConnectionContext().getBroker() .addDestination(producerExchange.getConnectionContext(), destination, isAllowTempAutoCreationOnSend()); producerExchange.setRegion(getRegion(destination)); producerExchange.setRegionDestination(null); } producerExchange.getRegion().send(producerExchange, message); // clean up so these references aren't kept (possible leak) in the producer exchange // especially since temps are transitory if (producerExchange.isMutable()) { producerExchange.setRegionDestination(null); producerExchange.setRegion(null); } }
@Override public boolean isDisposed() { return next.isDisposed(); }
@Override public boolean isDisposed() { return next.isDisposed(); }
@Override public boolean isDisposed() { return next.isDisposed(); }
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }
@Override public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception { ActiveMQDestination destination = message.getDestination(); message.setBrokerInTime(System.currentTimeMillis()); if (producerExchange.isMutable() || producerExchange.getRegion() == null || (producerExchange.getRegionDestination() != null && producerExchange.getRegionDestination().isDisposed())) { // ensure the destination is registered with the RegionBroker producerExchange.getConnectionContext().getBroker() .addDestination(producerExchange.getConnectionContext(), destination, isAllowTempAutoCreationOnSend()); producerExchange.setRegion(getRegion(destination)); producerExchange.setRegionDestination(null); } producerExchange.getRegion().send(producerExchange, message); // clean up so these references aren't kept (possible leak) in the producer exchange // especially since temps are transitory if (producerExchange.isMutable()) { producerExchange.setRegionDestination(null); producerExchange.setRegion(null); } }
@Override public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception { ActiveMQDestination destination = message.getDestination(); message.setBrokerInTime(System.currentTimeMillis()); if (producerExchange.isMutable() || producerExchange.getRegion() == null || (producerExchange.getRegionDestination() != null && producerExchange.getRegionDestination().isDisposed())) { // ensure the destination is registered with the RegionBroker producerExchange.getConnectionContext().getBroker() .addDestination(producerExchange.getConnectionContext(), destination, isAllowTempAutoCreationOnSend()); producerExchange.setRegion(getRegion(destination)); producerExchange.setRegionDestination(null); } producerExchange.getRegion().send(producerExchange, message); // clean up so these references aren't kept (possible leak) in the producer exchange // especially since temps are transitory if (producerExchange.isMutable()) { producerExchange.setRegionDestination(null); producerExchange.setRegion(null); } }
@Override public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception { ActiveMQDestination destination = message.getDestination(); message.setBrokerInTime(System.currentTimeMillis()); if (producerExchange.isMutable() || producerExchange.getRegion() == null || (producerExchange.getRegionDestination() != null && producerExchange.getRegionDestination().isDisposed())) { // ensure the destination is registered with the RegionBroker producerExchange.getConnectionContext().getBroker() .addDestination(producerExchange.getConnectionContext(), destination, isAllowTempAutoCreationOnSend()); producerExchange.setRegion(getRegion(destination)); producerExchange.setRegionDestination(null); } producerExchange.getRegion().send(producerExchange, message); // clean up so these references aren't kept (possible leak) in the producer exchange // especially since temps are transitory if (producerExchange.isMutable()) { producerExchange.setRegionDestination(null); producerExchange.setRegion(null); } }