mbaechler commented on code in PR #902:
URL: https://github.com/apache/james-project/pull/902#discussion_r868899005
##########
mailbox/api/src/main/java/org/apache/james/mailbox/extractor/TextExtractor.java:
##########
@@ -23,8 +23,14 @@
import org.apache.james.mailbox.model.ContentType;
+import reactor.core.publisher.Mono;
+
public interface TextExtractor {
ParsedContent extractContent(InputStream inputStream, ContentType
contentType) throws Exception;
+ default Mono<ParsedContent> extractContentReactive(InputStream
inputStream, ContentType contentType) {
+ return Mono.fromCallable(() -> extractContent(inputStream,
contentType));
Review Comment:
given that extractContent is blocking, would it makes sense to enforce this
to be executed in an elastic scheduler?
--
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]