Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
1e9c1a68
Commit
1e9c1a68
authored
May 05, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated spring.rabbitmq.listener.* properties
See gh-9055, gh-9108
parent
2894e571
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
186 deletions
+2
-186
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+0
-95
additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+0
-66
RabbitAutoConfigurationTests.java
...boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java
+2
-25
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
1e9c1a68
...
...
@@ -22,7 +22,6 @@ import java.util.List;
import
org.springframework.amqp.core.AcknowledgeMode
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory.CacheMode
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.DeprecatedConfigurationProperty
;
import
org.springframework.boot.context.properties.NestedConfigurationProperty
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
...
...
@@ -502,100 +501,6 @@ public class RabbitProperties {
this
.
type
=
containerType
;
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.auto-startup"
)
@Deprecated
public
boolean
isAutoStartup
()
{
return
getSimple
().
isAutoStartup
();
}
@Deprecated
public
void
setAutoStartup
(
boolean
autoStartup
)
{
getSimple
().
setAutoStartup
(
autoStartup
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.acknowledge-mode"
)
@Deprecated
public
AcknowledgeMode
getAcknowledgeMode
()
{
return
getSimple
().
getAcknowledgeMode
();
}
@Deprecated
public
void
setAcknowledgeMode
(
AcknowledgeMode
acknowledgeMode
)
{
getSimple
().
setAcknowledgeMode
(
acknowledgeMode
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.concurrency"
)
@Deprecated
public
Integer
getConcurrency
()
{
return
getSimple
().
getConcurrency
();
}
@Deprecated
public
void
setConcurrency
(
Integer
concurrency
)
{
getSimple
().
setConcurrency
(
concurrency
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.max-concurrency"
)
@Deprecated
public
Integer
getMaxConcurrency
()
{
return
getSimple
().
getMaxConcurrency
();
}
@Deprecated
public
void
setMaxConcurrency
(
Integer
maxConcurrency
)
{
getSimple
().
setMaxConcurrency
(
maxConcurrency
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.prefetch"
)
@Deprecated
public
Integer
getPrefetch
()
{
return
getSimple
().
getPrefetch
();
}
@Deprecated
public
void
setPrefetch
(
Integer
prefetch
)
{
getSimple
().
setPrefetch
(
prefetch
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.transaction-size"
)
@Deprecated
public
Integer
getTransactionSize
()
{
return
getSimple
().
getTransactionSize
();
}
@Deprecated
public
void
setTransactionSize
(
Integer
transactionSize
)
{
getSimple
().
setTransactionSize
(
transactionSize
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.default-requeue-rejected"
)
@Deprecated
public
Boolean
getDefaultRequeueRejected
()
{
return
getSimple
().
getDefaultRequeueRejected
();
}
@Deprecated
public
void
setDefaultRequeueRejected
(
Boolean
defaultRequeueRejected
)
{
getSimple
().
setDefaultRequeueRejected
(
defaultRequeueRejected
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.idle-event-interval"
)
@Deprecated
public
Long
getIdleEventInterval
()
{
return
getSimple
().
getIdleEventInterval
();
}
@Deprecated
public
void
setIdleEventInterval
(
Long
idleEventInterval
)
{
getSimple
().
setIdleEventInterval
(
idleEventInterval
);
}
@DeprecatedConfigurationProperty
(
replacement
=
"spring.rabbitmq.listener.simple.retry"
)
@Deprecated
public
ListenerRetry
getRetry
()
{
return
getSimple
().
getRetry
();
}
public
SimpleContainer
getSimple
()
{
return
this
.
simple
;
}
...
...
spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
View file @
1e9c1a68
...
...
@@ -363,72 +363,6 @@
"description"
:
"Create an AmqpAdmin bean."
,
"defaultValue"
:
true
},
{
"name"
:
"spring.rabbitmq.listener.retry.enabled"
,
"type"
:
"java.lang.Boolean"
,
"description"
:
"Whether or not publishing retries are enabled."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
false
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.enabled"
}
},
{
"name"
:
"spring.rabbitmq.listener.retry.initial-interval"
,
"type"
:
"java.lang.Long"
,
"description"
:
"Interval between the first and second attempt to publish or deliver a message."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
1000
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.initial-interval"
}
},
{
"name"
:
"spring.rabbitmq.listener.retry.max-attempts"
,
"type"
:
"java.lang.Integer"
,
"description"
:
"Maximum number of attempts to publish or deliver a message."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
3
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.max-attempts"
}
},
{
"name"
:
"spring.rabbitmq.listener.retry.max-interval"
,
"type"
:
"java.lang.Long"
,
"description"
:
"Maximum interval between attempts."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
10000
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.max-interval"
}
},
{
"name"
:
"spring.rabbitmq.listener.retry.multiplier"
,
"type"
:
"java.lang.Double"
,
"description"
:
"A multiplier to apply to the previous retry interval."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
1
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.multiplier"
}
},
{
"name"
:
"spring.rabbitmq.listener.retry.stateless"
,
"type"
:
"java.lang.Boolean"
,
"description"
:
"Whether or not retries are stateless or stateful."
,
"sourceType"
:
"org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry"
,
"defaultValue"
:
true
,
"deprecated"
:
true
,
"deprecation"
:
{
"replacement"
:
"spring.rabbitmq.listener.simple.retry.stateless"
}
},
{
"name"
:
"spring.session.hazelcast.flush-mode"
,
"defaultValue"
:
"on-save"
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java
View file @
1e9c1a68
...
...
@@ -293,28 +293,10 @@ public class RabbitAutoConfigurationTests {
assertThat
(
adviceChain
).
isNull
();
}
@Test
@Deprecated
public
void
testSimpleRabbitListenerContainerFactoryWithCustomDeprecatedSettings
()
{
testSimpleRabbitListenerContainerFactoryWithCustomSettings
(
"spring.rabbitmq.listener.retry.enabled:true"
,
"spring.rabbitmq.listener.retry.maxAttempts:4"
,
"spring.rabbitmq.listener.retry.initialInterval:2000"
,
"spring.rabbitmq.listener.retry.multiplier:1.5"
,
"spring.rabbitmq.listener.retry.maxInterval:5000"
,
"spring.rabbitmq.listener.autoStartup:false"
,
"spring.rabbitmq.listener.acknowledgeMode:manual"
,
"spring.rabbitmq.listener.concurrency:5"
,
"spring.rabbitmq.listener.maxConcurrency:10"
,
"spring.rabbitmq.listener.prefetch:40"
,
"spring.rabbitmq.listener.defaultRequeueRejected:false"
,
"spring.rabbitmq.listener.idleEventInterval:5"
,
"spring.rabbitmq.listener.transactionSize:20"
);
}
@Test
public
void
testSimpleRabbitListenerContainerFactoryWithCustomSettings
()
{
testSimpleRabbitListenerContainerFactoryWithCustomSettings
(
load
(
new
Class
<?>[]
{
MessageConvertersConfiguration
.
class
,
MessageRecoverersConfiguration
.
class
},
"spring.rabbitmq.listener.simple.retry.enabled:true"
,
"spring.rabbitmq.listener.simple.retry.maxAttempts:4"
,
"spring.rabbitmq.listener.simple.retry.initialInterval:2000"
,
...
...
@@ -328,11 +310,6 @@ public class RabbitAutoConfigurationTests {
"spring.rabbitmq.listener.simple.defaultRequeueRejected:false"
,
"spring.rabbitmq.listener.simple.idleEventInterval:5"
,
"spring.rabbitmq.listener.simple.transactionSize:20"
);
}
private
void
testSimpleRabbitListenerContainerFactoryWithCustomSettings
(
String
...
environment
)
{
load
(
new
Class
<?>[]
{
MessageConvertersConfiguration
.
class
,
MessageRecoverersConfiguration
.
class
},
environment
);
SimpleRabbitListenerContainerFactory
rabbitListenerContainerFactory
=
this
.
context
.
getBean
(
"rabbitListenerContainerFactory"
,
SimpleRabbitListenerContainerFactory
.
class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment