Skip to content

Commit 4e88a95

Browse files
committed
update doc
1 parent e8a23b4 commit 4e88a95

File tree

3 files changed

+80
-14
lines changed

3 files changed

+80
-14
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ext {
8383

8484
subprojects {
8585
group = "com.github.sonus21"
86-
version = "4.0.0-RELEASE"
86+
version = "4.0.0-RC1"
8787

8888
dependencies {
8989
// https://mvnrepository.com/artifact/org.springframework/spring-messaging

docs/CHANGELOG.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,36 @@ layout: default
88

99
All notable user-facing changes to this project are documented in this file.
1010

11+
## Release [4.0.0.RC1] 18-Mar-2026
12+
13+
{: .highlight}
14+
This is a release candidate for 4.0.0. It targets Spring Boot 4.x and Spring Framework 7.x.
15+
Please test thoroughly before using in production.
16+
17+
### Features
18+
* **Spring Boot 4.x support** — compatible with Spring Boot 4.0.1 and above.
19+
* **Spring Framework 7.x support** — built against Spring Framework 7.0.3, taking
20+
advantage of the updated messaging and context APIs.
21+
* **Java 21 baseline** — Java 21 is now the minimum supported runtime.
22+
* **Jackson 3.x support** — updated serialization layer to use Jackson 3.x
23+
(`tools.jackson` packages).
24+
* **Lettuce 7.x support** — Redis client updated to Lettuce 7.2.x.
25+
* `GenericMessageConverter` now supports generic envelope types such as `Event<T>`.
26+
The type parameter is resolved from the runtime class of the corresponding field
27+
value, enabling transparent round-trip serialization without requiring a custom
28+
message converter.
29+
30+
### Migration Notes
31+
* Requires Java 21+.
32+
* Requires Spring Boot 4.x / Spring Framework 7.x. Not backward compatible with
33+
Spring Boot 3.x — use the 3.x release line for older Spring Boot versions.
34+
* Jackson package namespace changed from `com.fasterxml.jackson` to `tools.jackson`
35+
in Jackson 3.x. Update any custom `ObjectMapper` configuration accordingly.
36+
1137
## Release [3.4.0] 22-July-2025
1238
### Fixes
13-
* Improved unique message enqueuing to reject duplicates upfront rather than during
14-
processing. #259
39+
* Improved unique message enqueuing to reject duplicates upfront rather than during
40+
processing. #259
1541

1642

1743
## Release [3.3.0] 29-June-2025

docs/configuration/configuration.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,36 +172,76 @@ public class BootstrapController {
172172

173173
## Message Converter Configuration
174174

175-
To customize message conversion, set the property
176-
`rqueue.message.converter.provider.class` to the fully qualified name of your provider
177-
class. This class must implement the `MessageConverterProvider` interface and return
175+
To customize message conversion, set the property
176+
`rqueue.message.converter.provider.class` to the fully qualified name of your provider
177+
class. This class must implement the `MessageConverterProvider` interface and return
178178
a Spring `MessageConverter`.
179179

180180
{: .note}
181-
Your custom provider must implement
181+
Your custom provider must implement
182182
`com.github.sonus21.rqueue.converter.MessageConverterProvider`.
183183

184184
```java
185185
class MyMessageConverterProvider implements MessageConverterProvider {
186186

187187
@Override
188188
public MessageConverter getConverter() {
189-
// here any message converter can be returned except null
189+
// here any message converter can be returned except null
190190
return new MyMessageConverter();
191191
}
192192
}
193193
```
194194

195-
The `DefaultRqueueMessageConverter` handles serialization for most use cases, but it
196-
may fail if classes are not shared between producing and consuming applications. To
197-
avoid shared dependencies, consider using JSON-based converters like
198-
`com.github.sonus21.rqueue.converter.JsonMessageConverter` or Spring's
199-
`JacksonJsonMessageConverter`. These serialize payloads into JSON, improving
195+
The `DefaultRqueueMessageConverter` handles serialization for most use cases, but it
196+
may fail if classes are not shared between producing and consuming applications. To
197+
avoid shared dependencies, consider using JSON-based converters like
198+
`com.github.sonus21.rqueue.converter.JsonMessageConverter` or Spring's
199+
`JacksonJsonMessageConverter`. These serialize payloads into JSON, improving
200200
interoperability.
201201

202-
Other serialization formats like MessagePack or Protocol Buffers (ProtoBuf) can also
202+
Other serialization formats like MessagePack or Protocol Buffers (ProtoBuf) can also
203203
be implemented based on your requirements.
204204

205+
### Generic Envelope Types
206+
207+
`GenericMessageConverter` (used by the default converter) supports **single-level
208+
generic envelope types** such as `Event<T>`. The type parameter is resolved at
209+
serialization time by inspecting the runtime class of the field value that corresponds
210+
to `T`.
211+
212+
```java
213+
// A generic envelope type
214+
public class Event<T> {
215+
private String id;
216+
private T payload;
217+
// getters/setters ...
218+
}
219+
220+
// Enqueue
221+
Event<Order> event = new Event<>("evt-123", order);
222+
rqueueMessageEnqueuer.enqueue("order-queue", event);
223+
224+
// Consume
225+
@RqueueListener(value = "order-queue")
226+
public void onEvent(Event<Order> event) { ... }
227+
```
228+
229+
The serialized form encodes both the envelope class and the type parameter:
230+
231+
```
232+
{"msg":"...","name":"com.example.Event#com.example.Order"}
233+
```
234+
235+
**Constraints:**
236+
237+
- The type parameter `T` must be a **non-generic** concrete class (e.g. `Order`, not
238+
`List<Order>`).
239+
- At least one field of type `T` on the envelope class must be **non-null** at
240+
serialization time, so the runtime type can be determined.
241+
- For `List<T>`, items must also be non-generic concrete classes. Envelopes like
242+
`List<Event<Order>>` are not supported.
243+
- Multi-level nesting (e.g. `Wrapper<Event<T>>`) is not supported.
244+
205245
## Additional Configuration
206246

207247
- **`rqueue.retry.per.poll`**: Determines how many times a polled message is retried

0 commit comments

Comments
 (0)