vttranlina commented on code in PR #2465:
URL: https://github.com/apache/james-project/pull/2465#discussion_r1814996207


##########
event-bus/cassandra/src/main/java/org/apache/james/events/CassandraEventDeadLetters.java:
##########
@@ -19,23 +19,44 @@
 
 package org.apache.james.events;
 
+import java.util.List;
+import java.util.Optional;
+import java.util.Set;
+
 import jakarta.inject.Inject;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
 
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
 public class CassandraEventDeadLetters implements EventDeadLetters {
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(CassandraEventDeadLetters.class);
 
     private final CassandraEventDeadLettersDAO cassandraEventDeadLettersDAO;
     private final CassandraEventDeadLettersGroupDAO 
cassandraEventDeadLettersGroupDAO;
+    private final EventSerializer eventSerializer;
+    private final Set<EventSerializer> allEventSerializers;

Review Comment:
   @chibenwa all issue come from
   When we want to use webadmin to retrigger event dead letter (that need read 
and deserialize string from cassandra)
   
   `EventDeadLettersRoutes` invoke `EventDeadLettersRedeliverService`
   and `EventDeadLettersRedeliverService` invoke `EventDeadLetters` (SINGLETON 
instance)
   
   The current code is:
   
![Screenshot_20241024_202233](https://github.com/user-attachments/assets/987ad98f-ac2d-4c45-a0e3-f1e8725afe1c)
   
   It is incorrect
   it should be
   `public EventDeadLettersRedeliverService(Map<EventBus, EventDeadLetters> 
eventBusesDeadLetterMap)`
   
   The Hung's idea here is: 
   
   Can have several instances of `EventDeadLetters` for "write" event to db 
(able to difference EventDeadLetters per EventBus)
   But have only single instance for "read" event from db.
   



-- 
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: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to