This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 85a9af8b818afff8a4a380f6021c63ce9fdef46a
Author: wnfkwnfk <[email protected]>
AuthorDate: Tue Oct 27 22:01:20 2020 +0800

    Update RabbitMQConnectionFactory.java
    
    when rabbitmq change guest's password, it cannot be connected and will 
throw exception:
    An unexpected connection driver error occured (Exception message: Socket 
closed)
    so we should set username and password here to make it work correctly
---
 .../org/apache/james/backends/rabbitmq/RabbitMQConnectionFactory.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/backends-common/rabbitmq/src/main/java/org/apache/james/backends/rabbitmq/RabbitMQConnectionFactory.java
 
b/backends-common/rabbitmq/src/main/java/org/apache/james/backends/rabbitmq/RabbitMQConnectionFactory.java
index 36989f9..cb45fc7 100644
--- 
a/backends-common/rabbitmq/src/main/java/org/apache/james/backends/rabbitmq/RabbitMQConnectionFactory.java
+++ 
b/backends-common/rabbitmq/src/main/java/org/apache/james/backends/rabbitmq/RabbitMQConnectionFactory.java
@@ -50,6 +50,10 @@ public class RabbitMQConnectionFactory {
             
connectionFactory.setChannelRpcTimeout(rabbitMQConfiguration.getChannelRpcTimeoutInMs());
             
connectionFactory.setConnectionTimeout(rabbitMQConfiguration.getConnectionTimeoutInMs());
             
connectionFactory.setNetworkRecoveryInterval(rabbitMQConfiguration.getNetworkRecoveryIntervalInMs());
+
+            
connectionFactory.setUsername(rabbitMQConfiguration.getManagementCredentials().getUser());
+            
connectionFactory.setPassword(String.valueOf(rabbitMQConfiguration.getManagementCredentials().getPassword()));
+
             return connectionFactory;
         } catch (Exception e) {
             throw new RuntimeException(e);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to