Polish "Support additional publisher confirm types"

See gh-17848
pull/17968/head
Madhura Bhave 5 years ago
parent 8c1c8a27d9
commit 8954fe13e5

@ -87,18 +87,13 @@ public class RabbitProperties {
@DurationUnit(ChronoUnit.SECONDS)
private Duration requestedHeartbeat;
/**
* Whether to enable publisher confirms.
*/
private boolean publisherConfirms;
/**
* Whether to enable publisher returns.
*/
private boolean publisherReturns;
/**
* The type of publisher confirms to use.
* Type of publisher confirms to use.
*/
private ConfirmType publisherConfirmType;
@ -280,17 +275,15 @@ public class RabbitProperties {
this.requestedHeartbeat = requestedHeartbeat;
}
@DeprecatedConfigurationProperty(reason = "replaced to support additional confirm types",
replacement = "spring.rabbitmq.publisher-confirm-type")
public boolean isPublisherConfirms() {
return this.publisherConfirmType.equals(ConfirmType.CORRELATED);
}
@Deprecated
public void setPublisherConfirms(boolean publisherConfirms) {
if (publisherConfirms) {
this.publisherConfirmType = ConfirmType.CORRELATED;
return;
}
this.publisherConfirmType = ConfirmType.NONE;
this.publisherConfirmType = (publisherConfirms) ? ConfirmType.CORRELATED : ConfirmType.NONE;
}
public boolean isPublisherReturns() {

@ -80,6 +80,7 @@ import static org.mockito.Mockito.verify;
* @author Greg Turnquist
* @author Stephane Nicoll
* @author Gary Russell
* @author HaiTao Zhang
*/
class RabbitAutoConfigurationTests {

Loading…
Cancel
Save