linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

JMAP - fault tolerance when Redis down #5175

Closed vttranlina closed 2 months ago

vttranlina commented 2 months ago

Why

When setting event.bus.keys.choice=redis in queue.properties file. If Redis is down, the method Email/set + EmailSubmission/set is waiting response for a long time

It is not good for the client Ref https://github.com/linagora/tmail-backend/issues/1013

How

Dod

chibenwa commented 2 months ago

Ignore the dispatch event via Redis in this failure time.

I would like this to be configurable please

quantranhong1999 commented 2 months ago

How about configuring it in the redis.properties or queue.properties something like event.bus.keys.failure.ignore=true? And ignore the error directly in the EventBus.

If we catch and handle the error in the higher layer e.g. JMAP for example, I think it is harder to track all places where we are calling the dispatch.

vttranlina commented 2 months ago

I would like this to be configurable please

The default value is yes?

chibenwa commented 2 months ago

event.bus.keys.failure.ignore=true

Yes precisely what I have in mind. IMO in redis.properties.

chibenwa commented 2 months ago

The default value is yes?

Until we are really sure we want this by default, then keep false as a default value please.

vttranlina commented 2 months ago

pr https://github.com/linagora/tmail-backend/pull/1026