public void setLastStoredSequenceId(long l) { auditProducerSequenceIds = true; if (connectionContext.isNetworkConnection()) { brokerService = connectionContext.getBroker().getBrokerService(); isNetworkProducer = true; } lastSendSequenceNumber.set(l); LOG.debug("last stored sequence id set: {}", l); }
protected final void waitForSpace(ConnectionContext context, ProducerBrokerExchange producerBrokerExchange, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException { if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { if (isFlowControlLogRequired()) { getLog().info("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning); if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) { if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) { if (isFlowControlLogRequired()) {
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } } super.addSubscription(context, sub); }
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug("changed ownership of {} to {}", this, tempDest.getConnectionId()); } super.addSubscription(context, sub); }
private ProducerBrokerExchange getProducerBrokerExchange(ProducerId id) throws IOException { ProducerBrokerExchange result = producerExchanges.get(id); if (result == null) { synchronized (producerExchanges) { result = new ProducerBrokerExchange(); TransportConnectionState state = lookupConnectionState(id); context = state.getContext(); result.setConnectionContext(context); if (context.isReconnect() || (context.isNetworkConnection() && connector.isAuditNetworkProducers())) { result.setLastStoredSequenceId(brokerService.getPersistenceAdapter().getLastProducerSequenceId(id)); } SessionState ss = state.getSessionState(id.getParentId()); if (ss != null) { result.setProducerState(ss.getProducerState(id)); ProducerState producerState = ss.getProducerState(id); if (producerState != null && producerState.getInfo() != null) { ProducerInfo info = producerState.getInfo(); result.setMutable(info.getDestination() == null || info.getDestination().isComposite()); } } producerExchanges.put(id, result); } } else { context = result.getConnectionContext(); } return result; }
+ ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info"; if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { throw new javax.jms.ResourceAllocationException(logMessage);
if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { throw new javax.jms.ResourceAllocationException("Usage Manager memory limit (" + memoryUsage.getLimit() + ") reached. Rejecting send for producer (" + message.getProducerId()
memoryUsage.getLimit(), getActiveMQDestination().getQualifiedName(), destinationStatistics.getMessages().getCount()); if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { ResourceAllocationException resourceAllocationException = sendMemAllocationException; if (resourceAllocationException == null) { if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) { flowControlTimeoutMessages.add(new TimeoutMessage(message, context, systemUsage .getSendFailIfNoSpaceAfterTimeout()));
public void setLastStoredSequenceId(long l) { auditProducerSequenceIds = true; if (connectionContext.isNetworkConnection()) { brokerService = connectionContext.getBroker().getBrokerService(); isNetworkProducer = true; } lastSendSequenceNumber.set(l); LOG.debug("last stored sequence id set: {}", l); }
public void setLastStoredSequenceId(long l) { auditProducerSequenceIds = true; if (connectionContext.isNetworkConnection()) { brokerService = connectionContext.getBroker().getBrokerService(); isNetworkProducer = true; } lastSendSequenceNumber.set(l); LOG.debug("last stored sequence id set: {}", l); }
public void setLastStoredSequenceId(long l) { auditProducerSequenceIds = true; if (connectionContext.isNetworkConnection()) { brokerService = connectionContext.getBroker().getBrokerService(); isNetworkProducer = true; } lastSendSequenceNumber.set(l); LOG.debug("last stored sequence id set: {}", l); }
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } } super.addSubscription(context, sub); }
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } } super.addSubscription(context, sub); }
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } } super.addSubscription(context, sub); }
public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } super.addSubscription(context, sub); }
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug("changed ownership of {} to {}", this, tempDest.getConnectionId()); } super.addSubscription(context, sub); }
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug("changed ownership of {} to {}", this, tempDest.getConnectionId()); } super.addSubscription(context, sub); }
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug("changed ownership of {} to {}", this, tempDest.getConnectionId()); } super.addSubscription(context, sub); }
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { // Only consumers on the same connection can consume from // the temporary destination // However, we could have failed over - and we do this // check client side anyways .... if (!context.isFaultTolerant() && (!context.isNetworkConnection() && !tempDest .getConnectionId().equals( sub.getConsumerInfo().getConsumerId() .getConnectionId()))) { tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId()); LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId()); } super.addSubscription(context, sub); }
private ProducerBrokerExchange getProducerBrokerExchange(ProducerId id) throws IOException { ProducerBrokerExchange result = producerExchanges.get(id); if (result == null) { synchronized (producerExchanges) { result = new ProducerBrokerExchange(); TransportConnectionState state = lookupConnectionState(id); context = state.getContext(); result.setConnectionContext(context); if (context.isReconnect() || (context.isNetworkConnection() && connector.isAuditNetworkProducers())) { result.setLastStoredSequenceId(brokerService.getPersistenceAdapter().getLastProducerSequenceId(id)); } SessionState ss = state.getSessionState(id.getParentId()); if (ss != null) { result.setProducerState(ss.getProducerState(id)); ProducerState producerState = ss.getProducerState(id); if (producerState != null && producerState.getInfo() != null) { ProducerInfo info = producerState.getInfo(); result.setMutable(info.getDestination() == null || info.getDestination().isComposite()); } } producerExchanges.put(id, result); } } else { context = result.getConnectionContext(); } return result; }