response.setCorrelationId(command.getCommandId()); transport.getTransportListener().onCommand(response);
@Override public void run() { TimeoutMessage timeout; try { while (true) { timeout = flowControlTimeoutMessages.take(); if (timeout != null) { synchronized (messagesWaitingForSpace) { if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) { ExceptionResponse response = new ExceptionResponse( new ResourceAllocationException( "Usage Manager Memory Limit Wait Timeout. Stopping producer (" + timeout.message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info")); response.setCorrelationId(timeout.message.getCommandId()); timeout.context.getConnection().dispatchAsync(response); } } } } } catch (InterruptedException e) { LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping"); } } }
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } else {
@Override public void run() { try { // While waiting for space to free up... the // message may have expired. if (message.isExpired()) { broker.messageExpired(context, message, null); getDestinationStatistics().getExpired().increment(); } else { doMessageSend(producerExchange, message); } if (sendProducerAck) { ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message .getSize()); context.getConnection().dispatchAsync(ack); } else { Response response = new Response(); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } catch (Exception e) { if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } } });
response.setCorrelationId(command.getCommandId()); transport.getTransportListener().onCommand(response);
response.setCorrelationId(command.getCommandId()); transport.getTransportListener().onCommand(response);
response.setCorrelationId(command.getCommandId()); transport.getTransportListener().onCommand(response);
response.setCorrelationId(command.getCommandId()); transport.getTransportListener().onCommand(response);
@Override public void run() { TimeoutMessage timeout; try { while (true) { timeout = flowControlTimeoutMessages.take(); if (timeout != null) { synchronized (messagesWaitingForSpace) { if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) { ExceptionResponse response = new ExceptionResponse( new ResourceAllocationException( "Usage Manager Memory Limit reached. Stopping producer (" + timeout.message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info")); response.setCorrelationId(timeout.message.getCommandId()); timeout.context.getConnection().dispatchAsync(response); } } } } } catch (InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping"); } } } };
@Override public void run() { TimeoutMessage timeout; try { while (true) { timeout = flowControlTimeoutMessages.take(); if (timeout != null) { synchronized (messagesWaitingForSpace) { if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) { ExceptionResponse response = new ExceptionResponse( new ResourceAllocationException( "Usage Manager Memory Limit reached. Stopping producer (" + timeout.message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info")); response.setCorrelationId(timeout.message.getCommandId()); timeout.context.getConnection().dispatchAsync(response); } } } } } catch (InterruptedException e) { LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping"); } } }
@Override public void run() { TimeoutMessage timeout; try { while (true) { timeout = flowControlTimeoutMessages.take(); if (timeout != null) { synchronized (messagesWaitingForSpace) { if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) { ExceptionResponse response = new ExceptionResponse( new ResourceAllocationException( "Usage Manager Memory Limit reached. Stopping producer (" + timeout.message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info")); response.setCorrelationId(timeout.message.getCommandId()); timeout.context.getConnection().dispatchAsync(response); } } } } } catch (InterruptedException e) { LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping"); } } }
@Override public void run() { TimeoutMessage timeout; try { while (true) { timeout = flowControlTimeoutMessages.take(); if (timeout != null) { synchronized (messagesWaitingForSpace) { if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) { ExceptionResponse response = new ExceptionResponse( new ResourceAllocationException( "Usage Manager Memory Limit reached. Stopping producer (" + timeout.message.getProducerId() + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "." + " See http://activemq.apache.org/producer-flow-control.html for more info")); response.setCorrelationId(timeout.message.getCommandId()); timeout.context.getConnection().dispatchAsync(response); } } } } } catch (InterruptedException e) { LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping"); } } }
if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } else {
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } else {
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } else {
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } else {
@Override public void run() { try { // While waiting for space to free up... the // message may have expired. if (message.isExpired()) { broker.messageExpired(context, message, null); getDestinationStatistics().getExpired().increment(); } else { doMessageSend(producerExchange, message); } if (sendProducerAck) { ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message .getSize()); context.getConnection().dispatchAsync(ack); } else { Response response = new Response(); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } catch (Exception e) { if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } } });
@Override public void run() { try { // While waiting for space to free up... the // message may have expired. if (message.isExpired()) { broker.messageExpired(context, message, null); getDestinationStatistics().getExpired().increment(); } else { doMessageSend(producerExchange, message); } if (sendProducerAck) { ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message .getSize()); context.getConnection().dispatchAsync(ack); } else { Response response = new Response(); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } catch (Exception e) { if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } } });
public void run() { try { // While waiting for space to free up... the // message may have expired. if (message.isExpired()) { broker.messageExpired(context, message, null); getDestinationStatistics().getExpired().increment(); } else { doMessageSend(producerExchange, message); } if (sendProducerAck) { ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message .getSize()); context.getConnection().dispatchAsync(ack); } else { Response response = new Response(); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } catch (Exception e) { if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } } });
@Override public void run() { try { // While waiting for space to free up... the // message may have expired. if (message.isExpired()) { broker.messageExpired(context, message, null); getDestinationStatistics().getExpired().increment(); } else { doMessageSend(producerExchange, message); } if (sendProducerAck) { ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message .getSize()); context.getConnection().dispatchAsync(ack); } else { Response response = new Response(); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } catch (Exception e) { if (!sendProducerAck && !context.isInRecoveryMode()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId()); context.getConnection().dispatchAsync(response); } } } });