You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JIRA: https://jira.spring.io/browse/INT-4341Fixes#2228
Add to the `RedisQueueInboundGateway` and `RedisQueueMessageDrivenEndpoint`support
for the `receiveTimeout` of 0 and block indefinitely
Added some simple tests to check if the receive timeout can be set to 0
**Cherry-pick to 4.3.x**
# Conflicts:
# spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java
# spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpoint.java
# spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueInboundChannelAdapterParserTests-context.xml
# spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueInboundChannelAdapterParserTests.java
Copy file name to clipboardExpand all lines: spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2014-2015 the original author or authors
2
+
* Copyright 2014-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -45,6 +45,8 @@
45
45
* @author David Liu
46
46
* @author Artem Bilan
47
47
* @author Gary Russell
48
+
* @author Matthias Jeschke
49
+
*
48
50
* @since 4.1
49
51
*/
50
52
@ManagedResource
@@ -125,7 +127,7 @@ public void setSerializer(RedisSerializer<?> serializer) {
125
127
* @param receiveTimeout Must be non-negative. Specified in milliseconds.
126
128
*/
127
129
publicvoidsetReceiveTimeout(longreceiveTimeout) {
128
-
Assert.isTrue(receiveTimeout > 0, "'receiveTimeout' must be > 0.");
130
+
Assert.isTrue(receiveTimeout >=0, "'receiveTimeout' must be >= 0.");
Copy file name to clipboardExpand all lines: spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpoint.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2013-2016 the original author or authors
2
+
* Copyright 2013-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -48,6 +48,8 @@
48
48
* @author Artem Bilan
49
49
* @author Gary Russell
50
50
* @author Rainer Frey
51
+
* @author Matthias Jeschke
52
+
*
51
53
* @since 3.0
52
54
*/
53
55
@ManagedResource
@@ -131,7 +133,7 @@ public void setExpectMessage(boolean expectMessage) {
131
133
* @param receiveTimeout Must be non-negative. Specified in milliseconds.
132
134
*/
133
135
publicvoidsetReceiveTimeout(longreceiveTimeout) {
134
-
Assert.isTrue(receiveTimeout > 0, "'receiveTimeout' must be > 0.");
136
+
Assert.isTrue(receiveTimeout >=0, "'receiveTimeout' must be >= 0.");
Copy file name to clipboardExpand all lines: spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueInboundChannelAdapterParserTests-context.xml
Copy file name to clipboardExpand all lines: spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisQueueInboundChannelAdapterParserTests.java
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2013-2015 the original author or authors.
2
+
* Copyright 2013-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
0 commit comments