GH-3601: Bring AMQP byte code compatibility back
Fixes https://github.com/spring-projects/spring-integration/issues/3601 The issue https://github.com/spring-projects/spring-integration/issues/3584 has introduced a regression when old constructor with an `AbstractMessageListenerContainer` was removed in favor of just `MessageListenerContainer`. But with that change all the dependant projects must be recompiled, which is not a case when Spring Cloud was not released against the latest Spring Boot. **Cherry-pick to `5.4.x`**
This commit is contained in:
committed by
Gary Russell
parent
fba4b20451
commit
d7a7bbbf75
@@ -119,6 +119,11 @@ public class AmqpInboundChannelAdapter extends MessageProducerSupport implements
|
||||
|
||||
private BatchMode batchMode = BatchMode.MESSAGES;
|
||||
|
||||
// TODO Remove in 6.0
|
||||
public AmqpInboundChannelAdapter(AbstractMessageListenerContainer listenerContainer) {
|
||||
this((MessageListenerContainer) listenerContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance using the provided container.
|
||||
* @param listenerContainer the container.
|
||||
|
||||
@@ -98,12 +98,23 @@ public class AmqpInboundGateway extends MessagingGatewaySupport {
|
||||
this(listenerContainer, new RabbitTemplate(listenerContainer.getConnectionFactory()), false);
|
||||
}
|
||||
|
||||
// TODO Remove in 6.0
|
||||
/**
|
||||
* Construct {@link AmqpInboundGateway} based on the provided {@link AbstractMessageListenerContainer}
|
||||
* to receive request messages and {@link AmqpTemplate} to send replies.
|
||||
* @param listenerContainer the {@link MessageListenerContainer} to receive AMQP messages.
|
||||
* @param amqpTemplate the {@link AmqpTemplate} to send reply messages.
|
||||
* @since 4.2
|
||||
*/
|
||||
public AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) {
|
||||
this((MessageListenerContainer) listenerContainer, amqpTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct {@link AmqpInboundGateway} based on the provided {@link MessageListenerContainer}
|
||||
* to receive request messages and {@link AmqpTemplate} to send replies.
|
||||
* @param listenerContainer the {@link MessageListenerContainer} to receive AMQP messages.
|
||||
* @param amqpTemplate the {@link AmqpTemplate} to send reply messages.
|
||||
* @since 4.2
|
||||
*/
|
||||
public AmqpInboundGateway(MessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) {
|
||||
this(listenerContainer, amqpTemplate, true);
|
||||
|
||||
Reference in New Issue
Block a user