You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/09/22 02:51:03 UTC
[james-project] 06/07: JAMES-3784 WebAdmin: Document - Provide RunningOptions (limit) for Redeliver event task, Reprocessing mail task
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch 3.7.x
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit cd418ddfd448227d471a9eb126bacb142b8f20be
Author: Tung Van TRAN <vt...@linagora.com>
AuthorDate: Mon Jun 27 14:13:58 2022 +0700
JAMES-3784 WebAdmin: Document - Provide RunningOptions (limit) for Redeliver event task, Reprocessing mail task
---
.../docs/modules/ROOT/pages/operate/guide.adoc | 7 ++++++
.../docs/modules/ROOT/pages/operate/webadmin.adoc | 28 ++++++++++++++++++++--
.../server/manage-guice-distributed-james.md | 7 ++++++
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/guide.adoc b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/guide.adoc
index 50b5bbb0c7..1b74424961 100644
--- a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/guide.adoc
+++ b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/guide.adoc
@@ -40,6 +40,10 @@ all mails in a mail repository] or
xref:operate/webadmin.adoc#_reprocessing_a_specific_mail_from_a_mail_repository[reprocessing
a single mail in a mail repository].
+In order to prevent unbounded processing that could consume unbounded resources. We can provide a CRON with `limit` parameter.
+Ex: 10 reprocessed per minute
+Note that it only support the reprocessing all mails.
+
Also, one can decide to
xref:operate/webadmin.adoc#_removing_all_mails_from_a_mail_repository[delete
all the mails of a mail repository] or
@@ -114,6 +118,9 @@ xref:operate/webadmin.adoc#_redeliver_all_events[redeliver all events]
task. It will start reprocessing all the failed events registered in
event dead letters.
+In order to prevent unbounded processing that could consume unbounded resources. We can provide a CRON with `limit` parameter.
+Ex: 10 redelivery per minute
+
If for some other reason you don’t need to redeliver all events, you
have more fine-grained operations allowing you to
xref:operate/webadmin.adoc#_redeliver_group_events[redeliver group events]
diff --git a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
index 47ec81b266..eaebfa653d 100644
--- a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
+++ b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
@@ -3310,8 +3310,10 @@ processing in. Defaults to the `state` field of each processed email.
- `consume` (boolean defaulting to `true`) whether the reprocessing should consume the mail in its originating mail repository. Passing
this value to `false` allows non destructive reprocessing as you keep a copy of the email in the mail repository and can be valuable
when debugging.
+- `limit` (integer value. Optional, default is empty). It enables to limit the count of elements reprocessed.
+If unspecified the count of the processed elements is unbounded
-For instance:
+redeliver_group_events
....
curl -XPATCH 'http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&queue=spool'
@@ -3697,6 +3699,17 @@ Response codes:
curl -XPOST http://ip:port/events/deadLetter?action=redeliver
....
+Additional query parameters are supported:
+
+- `limit` (integer value. Optional, default is empty). It enables to limit the count of elements redelivered.
+If unspecified the count of the processed elements is unbounded
+
+For instance:
+
+....
+curl -XPOST http://ip:port/events/deadLetter?action=redeliver&limit=10
+....
+
Will create a task that will attempt to redeliver all events stored in
``Event Dead Letter''. If successful, redelivered events will then be
removed from ``Dead Letter''.
@@ -3712,13 +3725,24 @@ Response codes:
=== Redeliver group events
....
-curl -XPOST http://ip:port/events/deadLetter/groups/org.apache.james.mailbox.events.EventBusTestFixture$GroupA
+curl -XPOST http://ip:port/events/deadLetter/groups/org.apache.james.mailbox.events.EventBusTestFixture$GroupA?action=redeliver
....
Will create a task that will attempt to redeliver all events of a
particular group stored in ``Event Dead Letter''. If successful,
redelivered events will then be removed from ``Dead Letter''.
+Additional query parameters are supported:
+
+- `limit` (integer value. Optional, default is empty). It enables to limit the count of elements redelivered.
+If unspecified the count of the processed elements is unbounded
+
+For instance:
+
+....
+curl -XPOST http://ip:port/events/deadLetter/groups/org.apache.james.mailbox.events.EventBusTestFixture$GroupA?action=redeliver&limit=10
+....
+
link:#_endpoints_returning_a_task[More details about endpoints returning
a task].
diff --git a/src/site/markdown/server/manage-guice-distributed-james.md b/src/site/markdown/server/manage-guice-distributed-james.md
index d5d21cec6f..d7a889dfcb 100644
--- a/src/site/markdown/server/manage-guice-distributed-james.md
+++ b/src/site/markdown/server/manage-guice-distributed-james.md
@@ -148,6 +148,10 @@ WebAdmin exposes all utilities for
or
[reprocessing a single mail in a mail repository](manage-webadmin.html#Reprocessing_a_specific_mail_from_a_mail_repository).
+In order to prevent unbounded processing that could consume unbounded resources. We can provide a CRON with `limit` parameter.
+Ex: 10 reprocessed per minute
+Note that it only support the reprocessing all mails.
+
Also, one can decide to
[delete all the mails of a mail repository](manage-webadmin.html#Removing_all_mails_from_a_mail_repository)
or [delete a single mail of a mail repository](manage-webadmin.html#Removing_a_mail_from_a_mail_repository).
@@ -209,6 +213,9 @@ An easy way to solve this is just to trigger then the
[redeliver all events](manage-webadmin.html#Redeliver_all_events) task. It will start
reprocessing all the failed events registered in event dead letters.
+In order to prevent unbounded processing that could consume unbounded resources. We can provide a CRON with `limit` parameter.
+Ex: 10 redelivery per minute
+
If for some other reason you don't need to redeliver all events, you have more fine-grained operations allowing you to
[redeliver group events](manage-webadmin.html#Redeliver_group_events) or even just
[redeliver a single event](manage-webadmin.html#Redeliver_a_single_event).
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org