/** * Avoid the possibility of not configuring the CachingConnectionFactory in sync with the number of concurrent * consumers. */ @Override protected void validateConfiguration() { super.validateConfiguration(); Assert.state( !(getAcknowledgeMode().isAutoAck() && getTransactionManager() != null), "The acknowledgeMode is NONE (autoack in Rabbit terms) which is not consistent with having an " + "external transaction manager. Either use a different AcknowledgeMode or make sure " + "the transactionManager is null."); }
/** * Avoid the possibility of not configuring the CachingConnectionFactory in sync with the number of concurrent * consumers. */ @Override protected void validateConfiguration() { super.validateConfiguration(); Assert.state( !(getAcknowledgeMode().isAutoAck() && getTransactionManager() != null), "The acknowledgeMode is NONE (autoack in Rabbit terms) which is not consistent with having an " + "external transaction manager. Either use a different AcknowledgeMode or make sure " + "the transactionManager is null."); }
/** * Delegates to {@link #validateConfiguration()} and {@link #initialize()}. */ @Override public final void afterPropertiesSet() { super.afterPropertiesSet(); Assert.state( this.exposeListenerChannel || !getAcknowledgeMode().isManual(), "You cannot acknowledge messages manually if the channel is not exposed to the listener " + "(please check your configuration and set exposeListenerChannel=true or acknowledgeMode!=MANUAL)"); Assert.state( !(getAcknowledgeMode().isAutoAck() && isChannelTransacted()), "The acknowledgeMode is NONE (autoack in Rabbit terms) which is not consistent with having a " + "transactional channel. Either use a different AcknowledgeMode or make sure channelTransacted=false"); validateConfiguration(); initialize(); }
/** * Delegates to {@link #validateConfiguration()} and {@link #initialize()}. */ @Override public final void afterPropertiesSet() { super.afterPropertiesSet(); Assert.state( this.exposeListenerChannel || !getAcknowledgeMode().isManual(), "You cannot acknowledge messages manually if the channel is not exposed to the listener " + "(please check your configuration and set exposeListenerChannel=true or acknowledgeMode!=MANUAL)"); Assert.state( !(getAcknowledgeMode().isAutoAck() && isChannelTransacted()), "The acknowledgeMode is NONE (autoack in Rabbit terms) which is not consistent with having a " + "transactional channel. Either use a different AcknowledgeMode or make sure channelTransacted=false"); validateConfiguration(); initialize(); }