quantranhong1999 commented on code in PR #2465:
URL: https://github.com/apache/james-project/pull/2465#discussion_r1814637883
##########
event-bus/cassandra/src/main/java/org/apache/james/events/CassandraEventDeadLetters.java:
##########
@@ -21,21 +21,38 @@
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 EventDeserializers deserializer;
+
+ public CassandraEventDeadLetters(CassandraEventDeadLettersDAO
cassandraEventDeadLettersDAO,
+ CassandraEventDeadLettersGroupDAO
cassandraEventDeadLettersGroupDAO,
+ EventSerializer eventSerializer) {
+ this(cassandraEventDeadLettersDAO, cassandraEventDeadLettersGroupDAO,
eventSerializer, new EventDeserializers(ImmutableSet.of(eventSerializer)));
+ }
@Inject
public CassandraEventDeadLetters(CassandraEventDeadLettersDAO
cassandraEventDeadLettersDAO,
- CassandraEventDeadLettersGroupDAO
cassandraEventDeadLettersGroupDAO) {
+ CassandraEventDeadLettersGroupDAO
cassandraEventDeadLettersGroupDAO,
+ EventSerializer eventSerializer,
+ EventDeserializers deserializer) {
Review Comment:
How about support for multiple `EventSerializer` as well? I found weird as
we support multiple `EventDeserializer` (s) but not for the serializer.
Maybe just create an `EventSerializersAggregate` or something to support
multiple serializers + deserializers?
--
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]