Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.3.0
-
Fix Version/s: 5.4.0
-
Component/s: Persistence
-
Security Level: Public
-
- Environment:
- -
Issue Links
| Depends | |||||||
|---|---|---|---|---|---|---|---|
|
|
||||||
Activity
| Field | Original Value | New Value |
|---|---|---|
| Status | New [ 10000 ] | Open [ 10002 ] |
| Priority | Major [ 3 ] | |
| Assignee | Christophe DENEUX [ cdeneux ] | Victor NOËL [ vnoel ] |
| Link |
This issue blocks |
| Summary | Introduce persistence in DeliveryChannel | Introduce a mechanism to handle a lot of messages in the DeliveryChannel |
| Description |
Currently, when many messages are put in a DeliveryChannel and the component does not take the messages, the size of the DeliveryChannel will grow until there is no more memory available.
In order to avoid that, currently, the CDK will drop messages when there is an excess (see We should introduce a mechanism for the queue to be persisted: instead of using memory (maybe after a threshold to not impact performance in normal conditions) the messages would be persisted to disk. Note that persisting to disk using things like memory mapped files is very efficient and writing to disk all the time could be acceptable actually. Special attention should be given to the handling of special situations such as JVM crashing and restoring of state after restart. |
Currently, when many messages are put in a DeliveryChannel and the component does not take the messages for any reasons, the size of the DeliveryChannel will grow until there is no more memory available.
Currently, no protection exists to avoid that. We should introduce a mechanism for the queue to be flushed on disk: instead of using memory (after a threshold to not impact performance in normal conditions) the messages would be stored on disk. Note that persisting to disk using things like memory mapped files is very efficient and writing to disk all the time could be acceptable actually. Special attention should be given to the handling of special situations such as JVM crashing and restoring of state after restart. |
| Fix Version/s | 5.0.1 [ 10579 ] |
| Link | This issue blocks PETALSDISTRIB-146 [ PETALSDISTRIB-146 ] |
| Link |
This issue depends on |
| Link |
This issue depends on |
| Fix Version/s | 5.0.2 [ 10661 ] | |
| Fix Version/s | 5.0.1 [ 10579 ] |
| Link | This issue blocks PETALSCDK-175 [ PETALSCDK-175 ] |
| Link |
This issue blocks |
| Fix Version/s | 5.0.2 [ 10661 ] | |
| Fix Version/s | 5.0.3 [ 10670 ] |
| Fix Version/s | 5.1.1 [ 10764 ] | |
| Fix Version/s | 5.1.0 [ 10670 ] |
| Assignee | Victor NOËL [ vnoel ] | |
| Fix Version/s | 5.2.1 [ 10877 ] | |
| Fix Version/s | 5.2.0 [ 10764 ] |
| Fix Version/s | 5.4.0 [ 11131 ] | |
| Fix Version/s | 5.3.0 [ 10877 ] |
| Transition | Status Change Time | Execution Times | Last Executer | Last Execution Date | |||||||||
|
|
|
|
|

One possible library we could use for persistence is Chronicle Queue.
See https://groups.google.com/forum/#!topic/java-chronicle/4-cOUnWQKnE for a discussion with the author to see if it can fit our needs.
It's quite low+level, but then it makes sense for it to be low-level since we are implementing an ESB where this kind of feature is critical.
Main open questions with it are:
PETALSESBCONT-327, in particular when messages and attachment are cached!).Also, this kind of behaviour can open interesting questions about replay (since we store all messages, before they are being processed AND after they are sent back, in two different queues!).
- Message are indefinitely stored on the disk (the queue is read with an index): some strategy must exist to remove old files, there is already a rotation strategy so it is easy to identify the file to remove.
- It means serializing every messages that have to be transferred, but that's the cost of robustness and not losing messages (and this question is related, in a way, to
- When recovering from a crash, the index has to be found again (but that can be done quite quickly and only once, or the index could have been stored also on disk).
Also, this kind of behaviour can open interesting questions about replay (since we store all messages, before they are being processed AND after they are sent back, in two different queues!).PETALSESBCONT-327, in particular when messages and attachment are cached!).