File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -525,9 +525,6 @@ protected final boolean sharedConnectionEnabled() {
525525
526526 @ Override
527527 protected void doInitialize () {
528- Assert .state (!this .consumerBatchEnabled || getMessageListener () instanceof BatchMessageListener
529- || getMessageListener () instanceof ChannelAwareBatchMessageListener ,
530- "When setting 'consumerBatchEnabled' to true, the listener must support batching" );
531528 Assert .state (!this .consumerBatchEnabled || isDeBatchingEnabled (),
532529 "When setting 'consumerBatchEnabled' to true, 'deBatchingEnabled' must also be true" );
533530 }
@@ -543,6 +540,9 @@ public int getActiveConsumerCount() {
543540 */
544541 @ Override
545542 protected void doStart () {
543+ Assert .state (!this .consumerBatchEnabled || getMessageListener () instanceof BatchMessageListener
544+ || getMessageListener () instanceof ChannelAwareBatchMessageListener ,
545+ "When setting 'consumerBatchEnabled' to true, the listener must support batching" );
546546 checkListenerContainerAware ();
547547 super .doStart ();
548548 synchronized (this .consumersMonitor ) {
You can’t perform that action at this time.
0 commit comments