chibenwa commented on code in PR #2465: URL: https://github.com/apache/james-project/pull/2465#discussion_r1810429290
########## event-bus/api/src/main/java/org/apache/james/events/EventDeadLetters.java: ########## @@ -93,6 +94,10 @@ public String asString() { Mono<Event> failedEvent(Group registeredGroup, InsertionId failDeliveredInsertionId); + default Mono<Event> failedEvent(Group registeredGroup, InsertionId failDeliveredInsertionId, Map<Group, EventSerializer> mapGroupToEventSerializer) { Review Comment: No we shall inject the event busses into event dead letter IMP we do not need this extra interface method. ########## server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliverService.java: ########## @@ -109,4 +113,11 @@ private Optional<EventBus> findEventBus(Group group) { .filter(eventBus -> eventBus.listRegisteredGroups().contains(group)) .findFirst(); } + + private Map<Group, EventSerializer> getMapGroupToSerializer() { + return eventBuses.stream().flatMap(eventBus -> eventBus.listRegisteredGroups() + .stream() + .map(group -> Pair.of(group, eventBus.getEventSerializer()))) + .collect(ImmutableMap.toImmutableMap(Pair::getLeft, Pair::getRight, (serializer1, serializer2) -> serializer1)); + } Review Comment: Move this into DeadLetter ? -- 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