[ https://issues.apache.org/jira/browse/JAMES-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
René Cordier updated JAMES-3996: -------------------------------- Summary: POC: Move RabbitMQ Event bus user notifications to Redis? (was: POC: Move RabbitMQ Event bus notifications to Redis?) > POC: Move RabbitMQ Event bus user notifications to Redis? > --------------------------------------------------------- > > Key: JAMES-3996 > URL: https://issues.apache.org/jira/browse/JAMES-3996 > Project: James Server > Issue Type: Improvement > Reporter: René Cordier > Priority: Major > > 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-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org