Skip to content

Commit b85a739

Browse files
authored
Rqueue job checkin (#54)
Job Checkin Long running jobs can do checkin periodically using job.checkin("I'm doing something"); Display past job history for a message in dashboard. Delete message metadata along with messages using background job Allow deleting messages from normal and scheduled queues instead of only dead letter queue. Fixes Redis string deserialisation issue, string were inserted without quote'' Fixes CSP rule error for inline javascript Scan only required beans for RqueueListener annotated methods Fixed double minus sign (--) in dashboard. Potential error for periodic message, if period was longer than 24 hours Dead letter queue message at front
1 parent 7044cb9 commit b85a739

File tree

254 files changed

+7063
-2404
lines changed

Some content is hidden

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

254 files changed

+7063
-2404
lines changed

.circleci/config.yml

+116-48
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ executors:
1818
ORG_GRADLE_PROJECT_sonatypePassword: xxx
1919
USER_NAME: rqueue
2020
REDIS_RUNNING: "true"
21-
run:
2221

2322

2423
jobs:
25-
boot_2_1:
24+
build:
2625
executor: rqueue-executor
2726
environment:
2827
SPRING_BOOT_VERSION: 2.1.0.RELEASE
@@ -32,27 +31,102 @@ jobs:
3231

3332
steps:
3433
- checkout
35-
36-
# Download and cache dependencies
3734
- restore_cache:
3835
keys:
3936
- v1-dependencies-{{ checksum "build.gradle" }}
4037
# fallback to using the latest cache if no exact match is found
4138
- v1-dependencies-
4239

4340
- run: gradle dependencies
44-
4541
- save_cache:
4642
paths:
4743
- ~/.gradle
4844
key: v1-dependencies-{{ checksum "build.gradle" }}
45+
- run: ./gradlew compileJava
46+
- run: ./gradlew compileTestJava
47+
- persist_to_workspace:
48+
root: .
49+
paths:
50+
- .
51+
unit_test:
52+
executor: rqueue-executor
53+
environment:
54+
SPRING_BOOT_VERSION: 2.1.0.RELEASE
55+
SPRING_VERSION: 5.1.2.RELEASE
56+
SPRING_DATA_VERSION: 2.1.2.RELEASE
57+
MICROMETER_VERSION: 1.1.0
58+
steps:
59+
- attach_workspace:
60+
at: .
61+
- run: ./gradlew codeCoverageReport -DincludeTags=unit
62+
- persist_to_workspace:
63+
root: .
64+
paths:
65+
- .
66+
producer_only_test:
67+
executor: rqueue-executor
68+
environment:
69+
SPRING_BOOT_VERSION: 2.1.0.RELEASE
70+
SPRING_VERSION: 5.1.2.RELEASE
71+
SPRING_DATA_VERSION: 2.1.2.RELEASE
72+
MICROMETER_VERSION: 1.1.0
73+
steps:
74+
- attach_workspace:
75+
at: .
4976
- run:
50-
name: Install Dependencies
51-
command: |
52-
sudo add-apt-repository ppa:chris-lea/redis-server
53-
sudo apt-get update
54-
sudo apt-get -y install redis-server
55-
redis-cli --version
77+
name: Install Dependencies
78+
command: |
79+
sudo add-apt-repository ppa:chris-lea/redis-server
80+
sudo apt-get update
81+
sudo apt-get -y install redis-server
82+
redis-cli --version
83+
- run: ./gradlew codeCoverageReport -DincludeTags=producerOnly
84+
- persist_to_workspace:
85+
root: .
86+
paths:
87+
- .
88+
89+
integration_test:
90+
executor: rqueue-executor
91+
environment:
92+
SPRING_BOOT_VERSION: 2.1.0.RELEASE
93+
SPRING_VERSION: 5.1.2.RELEASE
94+
SPRING_DATA_VERSION: 2.1.2.RELEASE
95+
MICROMETER_VERSION: 1.1.0
96+
steps:
97+
- attach_workspace:
98+
at: .
99+
- run:
100+
name: Install Dependencies
101+
command: |
102+
sudo add-apt-repository ppa:chris-lea/redis-server
103+
sudo apt-get update
104+
sudo apt-get -y install redis-server
105+
redis-cli --version
106+
- run: ./gradlew codeCoverageReport -DincludeTags=integration -DexcludeTags=redisCluster,producerOnly
107+
- persist_to_workspace:
108+
root: .
109+
paths:
110+
- .
111+
112+
redis_custer_test:
113+
executor: rqueue-executor
114+
environment:
115+
SPRING_BOOT_VERSION: 2.1.0.RELEASE
116+
SPRING_VERSION: 5.1.2.RELEASE
117+
SPRING_DATA_VERSION: 2.1.2.RELEASE
118+
MICROMETER_VERSION: 1.1.0
119+
steps:
120+
# Reuse the workspace from the build job
121+
- attach_workspace:
122+
at: .
123+
- run:
124+
name: Install Dependencies
125+
command: |
126+
sudo add-apt-repository ppa:chris-lea/redis-server
127+
sudo apt-get update
128+
sudo apt-get -y install redis-server
129+
redis-cli --version
56130
- run:
57131
name: Setup Redis Cluster
58132
background: true
@@ -72,47 +146,41 @@ jobs:
72146
cd 9005 && redis-server ./redis.conf &
73147
sleep 30
74148
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
75-
76-
- run: ./gradlew codeCoverageReport
77-
- run:
78-
name: Build Success
79-
when: on_success
80-
command: ./gradlew coveralls
81-
82-
boot_2_2:
149+
- run: ./gradlew codeCoverageReport -DincludeTags=redisCluster
150+
- persist_to_workspace:
151+
root: .
152+
paths:
153+
- .
154+
report_code_coverage:
83155
executor: rqueue-executor
84156
environment:
85-
SPRING_BOOT_VERSION: 2.2.0.RELEASE
86-
SPRING_VERSION: 5.2.0.RELEASE
87-
SPRING_DATA_VERSION: 2.2.0.RELEASE
88-
MICROMETER_VERSION: 1.3.2
157+
SPRING_BOOT_VERSION: 2.1.0.RELEASE
158+
SPRING_VERSION: 5.1.2.RELEASE
159+
SPRING_DATA_VERSION: 2.1.2.RELEASE
160+
MICROMETER_VERSION: 1.1.0
89161
steps:
90-
- checkout
91-
92-
# Download and cache dependencies
93-
- restore_cache:
94-
keys:
95-
- v2-dependencies-{{ checksum "build.gradle" }}
96-
# fallback to using the latest cache if no exact match is found
97-
- v2-dependencies-
98-
99-
- run: gradle dependencies
100-
101-
- save_cache:
102-
paths:
103-
- ~/.gradle
104-
key: v2-dependencies-{{ checksum "build.gradle" }}
105-
106-
# run tests!
107-
- run: ./gradlew codeCoverageReport
108-
- run:
109-
name: Upload Code Coverage Data
110-
when: always #on_success
111-
command: ./gradlew coveralls
112-
162+
- attach_workspace:
163+
at: .
164+
- run: ls -r build/reports/jacoco/test
165+
- run: pwd
166+
- run: ./gradlew coveralls
113167

114168
workflows:
115169
main:
116170
jobs:
117-
- boot_2_1
118-
#- boot_2_2
171+
- build
172+
- unit_test:
173+
requires:
174+
- build
175+
- producer_only_test:
176+
requires:
177+
- unit_test
178+
- integration_test:
179+
requires:
180+
- producer_only_test
181+
- redis_custer_test:
182+
requires:
183+
- integration_test
184+
- report_code_coverage:
185+
requires:
186+
- redis_custer_test

CHANGELOG.md

+73-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
11
# [Rqueue] New and Notable Changes
22

3-
**NOTE**: The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3+
## [2.3.0] - 2-Jan-2021
4+
5+
### Added
6+
7+
* Job checkin for long-running tasks
8+
* Display job and failure details in UI for each message
9+
* Allow deleting messages from normal and scheduled queues instead of only dead letter queue.
10+
* Scan only required beans for RqueueListener annotated methods
11+
12+
### Fixes
13+
14+
* Redis string deserialization issue, string were inserted without quote''
15+
* Dashboard CSP rule error for inline javascript
16+
* Double minus sign (--) in UI
17+
18+
### Miscellaneous
19+
20+
* Delete message metadata along with messages using background job
21+
* Potential error for a periodic message, if period was longer than 24 hours
22+
* Add retry limit exceeded messages at the front of dead letter queue instead at the back.
423

524
## [2.2.0] - 6-Dec-2020
25+
626
### Added
7-
* New API to enqueue periodic message. Periodic jobs are like cron jobs that would run at the certain interval.
27+
28+
* New API to enqueue periodic message. Periodic jobs are like cron jobs that would run at the
29+
certain interval.
830

931
## [2.1.1] - 24-Sep-2020
32+
1033
### Added
34+
1135
* More apis to enqueue unique message
1236

1337
## [2.1.0] - 16-Sep-2020
38+
1439
### Added
40+
1541
* Allow application to provide message id while enqueuing messages
1642
* Unique message enqueue
1743
* Api to check if message was enqueued or not
@@ -20,37 +46,43 @@
2046
* Enqueue list of objects and process them, like batch-processing
2147

2248
Fixes:
49+
2350
* Registered queues should not be deleted when used in producer mode
2451

2552
## [2.0.4] - 2-Aug-2020
2653

2754
### Added
28-
- Allow a listener to be added on dead letter queue
55+
56+
- Allow a listener to be added on dead letter queue
2957

3058
### Fixes:
31-
- Rqueue views/apis not accessible via api gateway
3259

60+
- Rqueue views/apis not accessible via api gateway
3361

3462
## [2.0.2] - 13-July-2020
3563

3664
### Fixes
65+
3766
- JDK dynamic proxy
3867
- AoP profiler
3968

4069
## [2.0.1] - 17-May-2020
4170

4271
### Added
72+
4373
- Allow registering a queue, that can be in push only mode
44-
- Apis to schedule task at the given time
74+
- Apis to schedule task at the given time
4575
- Refine enqueueIn apis to support Duration and TimeUnit
4676

4777
### Fixes
48-
- Arguments mismatch due to multiple class loaders.
49-
- Dead letter queue clear lead to clearing all the messages related to that queue.
5078

79+
- Arguments mismatch due to multiple class loaders.
80+
- Dead letter queue clear lead to clearing all the messages related to that queue.
5181

5282
## [2.0.0] - 10-May-2020
83+
5384
### Added
85+
5486
- Web interface to visualize queue
5587
- Move message from one queue to another
5688
- Latency visualizer
@@ -64,53 +96,82 @@ Fixes:
6496
- Strict or weighted algorithm for message execution
6597

6698
### Breaking Changes
67-
- Queue names are prefixed, that can lead to error. 1.x users set REDIS key `__rq::version` to `1`. It does try to find the version using key prefix, but if all queues are empty or no key exist in REDIS with prefix `rqueue-` then it will consider version 2.
99+
100+
- Queue names are prefixed, that can lead to error. 1.x users set REDIS key `__rq::version` to `1`.
101+
It does try to find the version using key prefix, but if all queues are empty or no key exist in
102+
REDIS with prefix `rqueue-` then it will consider version 2.
68103
- Renamed annotation field `maxJobExecutionTime` to `visibilityTimeout`
69104

70105
### Fixes
71-
- **Spring** Optional Micrometer, in older version config class was importing micrometer related classes, that could lead to error if classes are not found. In this version now code depends on bean name using DependsOn annotation.
106+
107+
- **Spring** Optional Micrometer, in older version config class was importing micrometer related
108+
classes, that could lead to error if classes are not found. In this version now code depends on
109+
bean name using DependsOn annotation.
72110

73111
## [1.4.0] - 08-Apr-2020
112+
74113
* Allow queue level configuration of job execution time.
75114
* Support to add Message processor for discard and dead letter queue
76115

77116
## [1.3.2] - 01-Apr-2020
117+
78118
* Support lower version of spring 2.1.x
79119

80120
## [1.3.1] - 27-Feb-2020
121+
81122
* **Fixed** Bootstrap issue due to optional dependencies of micrometer
82123

83124
## [1.3] - 11-Dec-2019
84-
* Expose multiple queue metrics using micrometer. (queue-size, delay queue size, processing queue size, dead letter queue size, execution counter, failure counter)
125+
126+
* Expose multiple queue metrics using micrometer. (queue-size, delay queue size, processing queue
127+
size, dead letter queue size, execution counter, failure counter)
85128
* An api to move messages from dead letter queue to other queue. (Any source queue to target queue).
86129

87130
### Fixed
88-
* An issue in the scheduler that's always scheduling job at the delay of 5 seconds. (this leads to messages are not copied from delayed queue to main queue on high load)
89131

132+
* An issue in the scheduler that's always scheduling job at the delay of 5 seconds. (this leads to
133+
messages are not copied from delayed queue to main queue on high load)
90134

91135
## [1.2] - 03-Nov-2019
92-
* Typo of *Later* to *Letter*
93136

137+
* Typo of *Later* to *Letter*
94138

95139
## [1.1] - 02-Nov-2019
140+
96141
* At least once message guarantee
97142
* Reduced ZSET calls
98143
* Lua script to make atomic operation
99144

100145
## [1.0] - 23-Oct-2019
146+
101147
* The basic version of Asynchronous task execution using Redis for Spring and Spring Boot
102148

103149
[1.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.0-RELEASE
150+
104151
[1.1]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.1-RELEASE
152+
105153
[1.2]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.2-RELEASE
154+
106155
[1.3]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.3-RELEASE
156+
107157
[1.3.1]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.3.1-RELEASE
158+
108159
[1.3.2]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.3.2-RELEASE
160+
109161
[1.4.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/1.4.0-RELEASE
162+
110163
[2.0.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/2.0.0-RELEASE
164+
111165
[2.0.1]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/2.0.1-RELEASE
166+
112167
[2.0.2]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue/2.0.2-RELEASE
168+
113169
[2.0.4]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.0.4-RELEASE
170+
114171
[2.1.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.1.0-RELEASE
172+
115173
[2.1.1]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.1.1-RELEASE
174+
116175
[2.2.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.2.0-RELEASE
176+
177+
[2.3.0]: https://repo1.maven.org/maven2/com/github/sonus21/rqueue-core/2.3.0-RELEASE

0 commit comments

Comments
 (0)