Skip to content

Commit 7ef545c

Browse files
authored
Reactive redis (#81)
* --wip-- [skip ci] * Reactive redis * code signing change * test compilation fix * test fixes * meta data * Reactive code example * * Fixes for class not found * Test infra * fixed failed test * new circle ci config for boot 2.0.6 * @tag("redisCluster") * Removed duplicate code * Removed duplicate copyright * Tests for reactive * Reactive integration test * Reactive integration test * Application * Reactive conenction factory * Reactive test * Disable test when reactive is enabled * Reactive test and fixes, some tests will fail * More test cases * Test case for invalid queue name * Run only when @EnabledIfEnvironmentVariable * add one more test file * Disable test
1 parent fa5d51f commit 7ef545c

145 files changed

Lines changed: 5292 additions & 835 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 153 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ aliases:
1515
SPRING_VERSION: 5.2.0.RELEASE
1616
SPRING_DATA_VERSION: 2.2.0.RELEASE
1717
MICROMETER_VERSION: 1.3.2
18+
RQUEUE_REACTIVE_ENABLED: "false"
19+
20+
environment_v0: &environment_v0
21+
environment:
22+
SPRING_BOOT_VERSION: 2.0.6.RELEASE
23+
SPRING_VERSION: 5.0.10.RELEASE
24+
SPRING_DATA_VERSION: 2.0.6.RELEASE
25+
MICROMETER_VERSION: 1.1.0
26+
RQUEUE_REACTIVE_ENABLED: "false"
27+
28+
reactive_environment: &reactive_environment
29+
environment:
30+
SPRING_BOOT_VERSION: 2.2.0.RELEASE
31+
SPRING_VERSION: 5.2.0.RELEASE
32+
SPRING_DATA_VERSION: 2.2.0.RELEASE
33+
MICROMETER_VERSION: 1.3.2
34+
RQUEUE_REACTIVE_ENABLED: "true"
35+
1836

1937
persist_to_workspace: &persist_to_workspace
2038
persist_to_workspace:
@@ -52,9 +70,6 @@ aliases:
5270
sleep 30
5371
redis-cli --cluster create 127.0.0.1:9000 127.0.0.1:9001 127.0.0.1:9002 127.0.0.1:9003 127.0.0.1:9004 127.0.0.1:9005 --cluster-replicas 1 --cluster-yes
5472
55-
default: &default
56-
executor: rqueue-executor
57-
<<: *environment
5873
5974
copy_logs: &copy_logs
6075
run:
@@ -87,6 +102,18 @@ aliases:
87102
path: test-results
88103

89104

105+
default: &default
106+
executor: rqueue-executor
107+
<<: *environment
108+
109+
default_v0: &default_vo
110+
executor: rqueue-executor
111+
<<: *environment_v0
112+
113+
reactive: &reactive
114+
executor: rqueue-executor
115+
<<: *reactive_environment
116+
90117
executors:
91118
rqueue-executor:
92119
machine:
@@ -103,86 +130,129 @@ executors:
103130
USER_NAME: rqueue
104131
REDIS_RUNNING: "true"
105132

133+
build_steps: &build_steps
134+
steps:
135+
- checkout
136+
- restore_cache:
137+
keys:
138+
- v1-dependencies-{{ checksum "build.gradle" }}
139+
# fallback to using the latest cache if no exact match is found
140+
- v1-dependencies-
141+
142+
- run: gradle dependencies
143+
- save_cache:
144+
paths:
145+
- ~/.gradle
146+
key: v1-dependencies-{{ checksum "build.gradle" }}
147+
- run: ./gradlew compileJava
148+
- run: ./gradlew compileTestJava
149+
- *persist_to_workspace
150+
151+
unit_test_steps: &unit_test_steps
152+
steps:
153+
- *attach_workspace
154+
- run: ./gradlew codeCoverageReport -DincludeTags=unit
155+
- *persist_to_workspace
156+
- *copy_logs
157+
- *copy_test_results
158+
- *store_logs
159+
- *store_test_results
160+
161+
producer_test_steps: &producer_test_steps
162+
steps:
163+
- *attach_workspace
164+
- *redis_dep
165+
- run: ./gradlew codeCoverageReport -DincludeTags=producerOnly
166+
- *persist_to_workspace
167+
- *copy_logs
168+
- *copy_test_results
169+
- *store_logs
170+
- *store_test_results
171+
172+
integration_test_steps: &integration_test_steps
173+
steps:
174+
- *attach_workspace
175+
- *redis_dep
176+
- run: ./gradlew codeCoverageReport -DincludeTags=integration -DexcludeTags=redisCluster,producerOnly
177+
- *persist_to_workspace
178+
- *copy_logs
179+
- *copy_test_results
180+
- *store_logs
181+
- *store_test_results
182+
183+
redis_custer_test_steps: &redis_cluster_test_steps
184+
steps:
185+
- *attach_workspace
186+
- *redis_dep
187+
- *redis_cluster_setup
188+
- run: ./gradlew codeCoverageReport -DincludeTags=redisCluster
189+
- *persist_to_workspace
190+
- *copy_logs
191+
- *copy_test_results
192+
- *store_logs
193+
- *store_test_results
194+
195+
report_code_coverage_steps: &report_code_coverage_steps
196+
steps:
197+
- *attach_workspace
198+
- run: ./gradlew coveralls
199+
- *copy_logs
200+
- *copy_test_results
201+
- *store_logs
202+
- *store_test_results
106203

107204
jobs:
108205
build:
109206
<<: *default
110-
steps:
111-
- checkout
112-
- restore_cache:
113-
keys:
114-
- v1-dependencies-{{ checksum "build.gradle" }}
115-
# fallback to using the latest cache if no exact match is found
116-
- v1-dependencies-
117-
118-
- run: gradle dependencies
119-
- save_cache:
120-
paths:
121-
- ~/.gradle
122-
key: v1-dependencies-{{ checksum "build.gradle" }}
123-
- run: ./gradlew compileJava
124-
- run: ./gradlew compileTestJava
125-
- *persist_to_workspace
207+
<<: *build_steps
208+
209+
build_v0:
210+
<<: *default_vo
211+
<<: *build_steps
126212

127213
unit_test:
128214
<<: *default
129-
steps:
130-
- *attach_workspace
131-
- run: ./gradlew codeCoverageReport -DincludeTags=unit
132-
- *persist_to_workspace
133-
- *copy_logs
134-
- *copy_test_results
135-
- *store_logs
136-
- *store_test_results
215+
<<: *unit_test_steps
137216

217+
unit_test_v0:
218+
<<: *default_vo
219+
<<: *unit_test_steps
138220

139221
producer_only_test:
140222
<<: *default
141-
steps:
142-
- *attach_workspace
143-
- *redis_dep
144-
- run: ./gradlew codeCoverageReport -DincludeTags=producerOnly
145-
- *persist_to_workspace
146-
- *copy_logs
147-
- *copy_test_results
148-
- *store_logs
149-
- *store_test_results
223+
<<: *producer_test_steps
150224

225+
producer_only_test_v0:
226+
<<: *default_vo
227+
<<: *producer_test_steps
151228

152229
integration_test:
153230
<<: *default
154-
steps:
155-
- *attach_workspace
156-
- *redis_dep
157-
- run: ./gradlew codeCoverageReport -DincludeTags=integration -DexcludeTags=redisCluster,producerOnly
158-
- *persist_to_workspace
159-
- *copy_logs
160-
- *copy_test_results
161-
- *store_logs
162-
- *store_test_results
231+
<<: *integration_test_steps
232+
233+
reactive_integration_test:
234+
<<: *reactive
235+
<<: *integration_test_steps
236+
237+
integration_test_v0:
238+
<<: *default_vo
239+
<<: *integration_test_steps
163240

164241
redis_custer_test:
165242
<<: *default
166-
steps:
167-
- *attach_workspace
168-
- *redis_dep
169-
- *redis_cluster_setup
170-
- run: ./gradlew codeCoverageReport -DincludeTags=redisCluster
171-
- *persist_to_workspace
172-
- *copy_logs
173-
- *copy_test_results
174-
- *store_logs
175-
- *store_test_results
243+
<<: *redis_cluster_test_steps
244+
245+
redis_custer_test_v0:
246+
<<: *default_vo
247+
<<: *redis_cluster_test_steps
176248

177249
report_code_coverage:
178250
<<: *default
179-
steps:
180-
- *attach_workspace
181-
- run: ./gradlew coveralls
182-
- *copy_logs
183-
- *copy_test_results
184-
- *store_logs
185-
- *store_test_results
251+
<<: *report_code_coverage_steps
252+
253+
report_code_coverage_v0:
254+
<<: *default_vo
255+
<<: *report_code_coverage_steps
186256

187257
workflows:
188258
main:
@@ -197,9 +267,29 @@ workflows:
197267
- integration_test:
198268
requires:
199269
- producer_only_test
200-
- redis_custer_test:
270+
- reactive_integration_test:
201271
requires:
202272
- integration_test
273+
- redis_custer_test:
274+
requires:
275+
- reactive_integration_test
203276
- report_code_coverage:
204277
requires:
205278
- redis_custer_test
279+
main_v0:
280+
jobs:
281+
- build_v0
282+
- unit_test_v0:
283+
requires:
284+
- build_v0
285+
- producer_only_test_v0:
286+
requires:
287+
- unit_test_v0
288+
- integration_test_v0:
289+
requires:
290+
- producer_only_test_v0
291+
- redis_custer_test_v0:
292+
requires:
293+
- integration_test_v0
294+
295+

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# [Rqueue] New and Notable Changes
22

3-
## [2.6.1] - 1-Marc-2021
3+
## [2.7.0] - TBD
4+
5+
### Fixes
6+
7+
* Spring Boot App could not start due to class not found error **Boot 2.0**
8+
* Utility UI message move not working due to invalid data type
9+
10+
### Added
11+
12+
* Support for Reactive Redis and Spring Webflux
13+
* Delete message metadata when `rqueue.message.durability.in-terminal-state` is less than equal to
14+
zero
15+
* Delete job detail when `rqueue.job.durability.in-terminal-state` is less tha equal to zero
16+
17+
## [2.6.1] - 1-Mar-2021
418

519
### Fixes
620

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ services code is in Spring.
4141
* **Long execution job**: Long running jobs can check in periodically.
4242
* **Middleware**: Add one or more middleware, middlewares are called before listener method.
4343
* **Message Multicasting**: Call multiple message listeners on very message
44+
* **Reactive Programming**: Supports reactive Redis and spring webflux
4445

4546
## Getting Started
4647

@@ -244,9 +245,18 @@ PR/[issue](https://github.com/sonus21/rqueue/issues/new?template=i-m-using-rqueu
244245
## Contribution
245246

246247
You are most welcome for any pull requests for any feature/bug/enhancement. You would need Java8 and
247-
gradle to start with.
248+
gradle to start with. In root `build.gradle` file comment out spring related versions, or set
249+
environment variables for Spring versions.
250+
248251
**Please format your code with Google Java formatter.**
249252

253+
```bash
254+
// springBootVersion = '2.2.0.RELEASE'
255+
// springVersion = '5.2.0.RELEASE'
256+
// springDataVersion = '2.2.0.RELEASE'
257+
// microMeterVersion = '1.3.2'
258+
```
259+
250260
## Links
251261

252262
* Documentation:
@@ -260,6 +270,7 @@ gradle to start with.
260270
* [https://repo1.maven.org/maven2/com/github/sonus21/rqueue-spring-boot-starter](https://repo1.maven.org/maven2/com/github/sonus21/rqueue-spring-boot-starter)
261271

262272
* StackOverflow: [https://stackoverflow.com/tags/rqueue](https://stackoverflow.com/tags/rqueue)
273+
* Discord: https://discord.gg/2hgQZXS2
263274
* Project
264275
Progress: [https://github.com/sonus21/rqueue/projects/3](https://github.com/sonus21/rqueue/projects/3)
265276

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ ext {
2828
springDataVersion = System.getenv("SPRING_DATA_VERSION")
2929
microMeterVersion = System.getenv("MICROMETER_VERSION")
3030

31-
springBootVersion = '2.2.0.RELEASE'
32-
springVersion = '5.2.0.RELEASE'
33-
springDataVersion = '2.2.0.RELEASE'
34-
microMeterVersion = '1.3.2'
31+
// springBootVersion = '2.2.0.RELEASE'
32+
// springVersion = '5.2.0.RELEASE'
33+
// springDataVersion = '2.2.0.RELEASE'
34+
// microMeterVersion = '1.3.2'
3535

3636
// logging dependencies
3737
lombokVersion = '1.18.10'
@@ -56,7 +56,7 @@ ext {
5656
pebbleVersion = '3.1.5'
5757

5858
// database
59-
lettuceVersion = '5.2.0.RELEASE'
59+
lettuceVersion = '5.0.2.RELEASE'
6060
javaxAnnotationVersion = '1.3.2'
6161
jpaVersion = '2.2'
6262
hibernateVersion = '5.4.9.Final'
@@ -71,7 +71,7 @@ ext {
7171

7272
subprojects {
7373
group = 'com.github.sonus21'
74-
version = '2.6.1-RELEASE'
74+
version = '2.7.0-RELEASE'
7575

7676
dependencies {
7777
// https://mvnrepository.com/artifact/org.springframework/spring-messaging

0 commit comments

Comments
 (0)