public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
consumer.clear(false);
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException { if (logger.isTraceEnabled()) { logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); } checkClosed(); // We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back // first before rolling back // This ensures messages are received in the same order after rollback w.r.t. to messages in the buffer // For core we could just do a straight rollback, it really depends if we want JMS style semantics or not... boolean wasStarted = started; if (wasStarted) { stop(); } // We need to make sure we don't get any inflight messages for (ClientConsumerInternal consumer : cloneConsumers()) { consumer.clear(waitConsumers); } // Acks must be flushed here *after connection is stopped and all onmessages finished executing flushAcks(); sessionContext.simpleRollback(isLastMessageAsDelivered); if (wasStarted) { start(); } rollbackOnly = false; }
consumer.clear(false);
consumer.clear(false);
consumer.clear(false);
consumer.clear(false);
consumer.clear(false);
consumer.clear(false);