Skip to content

Commit fc7bd12

Browse files
committed
Move spring-retry from spring-amqp to spring-rabbit
The Spring Retry project is phasing out, plus there is really no reason to keep extra dependency in the SPI module.
1 parent e97976c commit fc7bd12

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,6 @@ project('spring-amqp') {
300300

301301
dependencies {
302302
api 'org.springframework:spring-core'
303-
api("org.springframework.retry:spring-retry:$springRetryVersion") {
304-
exclude group: 'org.springframework'
305-
}
306303
optionalApi 'org.springframework:spring-messaging'
307304
optionalApi 'org.springframework:spring-oxm'
308305
optionalApi 'org.springframework:spring-context'
@@ -357,6 +354,9 @@ project('spring-rabbit') {
357354
api 'org.springframework:spring-messaging'
358355
api 'org.springframework:spring-tx'
359356
api 'io.micrometer:micrometer-observation'
357+
api("org.springframework.retry:spring-retry:$springRetryVersion") {
358+
exclude group: 'org.springframework'
359+
}
360360

361361
optionalApi 'org.springframework:spring-aop'
362362
optionalApi 'org.springframework:spring-webflux'

spring-amqp/src/main/java/org/springframework/amqp/support/SendRetryContextAccessor.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020

2121
import org.springframework.amqp.core.Address;
2222
import org.springframework.amqp.core.Message;
23-
import org.springframework.retry.RetryContext;
23+
import org.springframework.core.AttributeAccessor;
2424

2525
/**
2626
* Type safe accessor for retried message sending.
2727
*
2828
* @author Gary Russell
29+
* @author Artem Bilan
30+
*
2931
* @since 2.0.6
3032
*
3133
*/
@@ -50,7 +52,7 @@ private SendRetryContextAccessor() {
5052
* @return the message.
5153
* @see #MESSAGE
5254
*/
53-
public static @Nullable Message getMessage(RetryContext context) {
55+
public static @Nullable Message getMessage(AttributeAccessor context) {
5456
return (Message) context.getAttribute(MESSAGE);
5557
}
5658

@@ -60,7 +62,7 @@ private SendRetryContextAccessor() {
6062
* @return the address.
6163
* @see #ADDRESS
6264
*/
63-
public static @Nullable Address getAddress(RetryContext context) {
65+
public static @Nullable Address getAddress(AttributeAccessor context) {
6466
return (Address) context.getAttribute(ADDRESS);
6567
}
6668

0 commit comments

Comments
 (0)