You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2024/02/19 03:30:00 UTC

[jira] [Created] (JAMES-3996) POC: Move RabbitMQ Event bus notifications to Redis?

René Cordier created JAMES-3996:
-----------------------------------

             Summary: POC: Move RabbitMQ Event bus notifications to Redis?
                 Key: JAMES-3996
                 URL: https://issues.apache.org/jira/browse/JAMES-3996
             Project: James Server
          Issue Type: Improvement
            Reporter: René Cordier


In a setup with a RabbitMQ cluster, and quorum queues, we observed that if Cassandra was unavailable for some reason, heavy nacks causing very high absurd traffic with heavy memory usage, creating overall issues with the event bus in general.

Here the goal would be to investigate if it's possible to use Redis instead of RabbitMQ for delegating the user notifications. Might use Redis pub-sub or streams to achieve this, by registering the event listeners on Redis instead of RabbitMQ.

Concerned code on RabbitMQ event bus:


{code:java}
    default Publisher<Registration> register(EventListener listener, RegistrationKey key) \{
        return register(EventListener.wrapReactive(listener), key);
    }

    Publisher<Registration> register(EventListener.ReactiveEventListener listener, RegistrationKey key);

    default Publisher<Registration> register(EventListener.ReactiveEventListener listener, Collection<RegistrationKey> keys) \{
        return Flux.fromIterable(keys)
            .concatMap(key -> register(listener, key))
            .reduce((reg1, reg2) -> () -> Flux.merge(reg1.unregister(), reg2.unregister()))
            .map(unRegistrationWithMergedFlux -> () -> Mono.from(Flux.from(unRegistrationWithMergedFlux.unregister())
                .then()));
    }
{code}

It's just a POC to see first if it's achievable or not, with performance tests. If results are positive, we might envisage to integrate it in a cleaner way. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org