chibenwa commented on PR #2824:
URL: https://github.com/apache/james-project/pull/2824#issuecomment-3370931720
Ok I got the point. Because we do not create a task for this, then we cannot
hook on the task multiplexing system.
- Using another temporary path is indeed brittle.
> we run just one task, for all users, and return a single taskId, so we
can declare this route as a task and plug it that way
Boiler plate we tried to avoid and if it is loooong then we might trigger
the timeout clauses. Splitting by user would allow eg parallel execution and
finer grained execution
> we rework the Task route api
This sounds complex
> or maybe someone has a better proposition?
Yes!
Today we aggegate `@Named(ALL_MESSAGES_TASKS)
Set<TaskFromRequestRegistry.TaskRegistration> allMessagesTaskRegistration` to
build the route but we can either generify the declaration or add another
variable.
IE `@Named(ALL_MESSAGES_TASKS) Set<TaskFromRequestRegistry.TaskRegistration>
allMessagesTaskRegistration, @Named(ALL_MESSAGES_TASKS) Set<ExtraBehaviour>
extraBehaviours`
With
```
interface ExtraBehaviour {
Predicate<Request> applicability();
Route behaviour();
}
```
And upon post MessagesRoute definition would check extra behaviour
applicability before defining the registered tasks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]