quantranhong1999 commented on code in PR #1102:
URL: https://github.com/apache/james-project/pull/1102#discussion_r935327131
##########
third-party/rspamd/docker-compose.yml:
##########
@@ -3,11 +3,29 @@ version: '3'
services:
james:
+ depends_on:
+ - rspamd
image: apache/james:memory-latest
container_name: james
hostname: james.local
volumes:
+ -
/home/tungtv/workplace/2_JAMES/ENV/tmail-backend-memory/keystore:/root/conf/keystore
Review Comment:
Please share the `keystore` file.
##########
third-party/rspamd/src/main/java/org/apache/james/rspamd/module/RSpamDModule.java:
##########
@@ -49,4 +57,11 @@ protected void configure() {
public AdditionalInformationDTOModule<? extends
TaskExecutionDetails.AdditionalInformation, ? extends AdditionalInformationDTO>
webAdminFeedSpamAdditionalInformation() {
return
FeedSpamToRSpamDTaskAdditionalInformationDTO.SERIALIZATION_MODULE;
}
+
+ @Provides
+ @Singleton
+ public RSpamDHttpClient rSpamDHttpClient(PropertiesProvider
propertiesProvider) throws ConfigurationException, FileNotFoundException {
+ RSpamDClientConfiguration rSpamDClientConfiguration =
RSpamDClientConfiguration.from(propertiesProvider.getConfiguration("rspamd"));
+ return new RSpamDHttpClient(rSpamDClientConfiguration);
+ }
Review Comment:
Should we create bean from `RSpamDClientConfiguration` level? (we inject it
into the client
https://github.com/apache/james-project/blob/eb2178a9269851cf4d15eed98669faa172cedd61/third-party/rspamd/src/main/java/org/apache/james/rspamd/client/RSpamDHttpClient.java).
And we still can set `RSpamDHttpClient` instance to singleton if we want.
--
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]