From af6105b21ca59a1d0da1e38f4e41fb06d1610d6d Mon Sep 17 00:00:00 2001 From: terrfly Date: Tue, 27 Jul 2021 17:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0activeMQ=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=B1=A0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/devCommons/config/application.yml | 11 ++++++-- conf/manager/application.yml | 11 ++++++-- conf/merchant/application.yml | 25 +++++++------------ conf/payment/application.yml | 11 ++++++-- .../jeepay-components-mq/pom.xml | 13 +++++++++- 5 files changed, 48 insertions(+), 23 deletions(-) diff --git a/conf/devCommons/config/application.yml b/conf/devCommons/config/application.yml index cbcaf95..17b76c2 100644 --- a/conf/devCommons/config/application.yml +++ b/conf/devCommons/config/application.yml @@ -51,9 +51,16 @@ spring: timeout: 1000 password: -# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) +# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) activemq: - broker-url: tcp://localhost:61616 #连接地址 + broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) #连接地址 + in-memory: false # Jeepay项目不可使用内存模式, 需要连接多个消费者。 + user: system # activeMQ默认无需账密认证。 打开认证:activemq.xml添加simpleAuthenticationPlugin标签,账密在credentials.properties文件。 + password: manager + pool: + enabled: true + max-connections: 10 + idle-timeout: 30000 # 空闲的连接过期时间,默认为30秒 # # #rabbitmq配置 ( 注意: rabbitmq配置项需在spring的下级 ) # rabbitmq: diff --git a/conf/manager/application.yml b/conf/manager/application.yml index 80c62ab..30632d7 100644 --- a/conf/manager/application.yml +++ b/conf/manager/application.yml @@ -61,9 +61,16 @@ spring: timeout: 1000 password: -# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) +# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) activemq: - broker-url: tcp://localhost:61616 #连接地址 + broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) #连接地址 + in-memory: false # Jeepay项目不可使用内存模式, 需要连接多个消费者。 + user: system # activeMQ默认无需账密认证。 打开认证:activemq.xml添加simpleAuthenticationPlugin标签,账密在credentials.properties文件。 + password: manager + pool: + enabled: true + max-connections: 10 + idle-timeout: 30000 # 空闲的连接过期时间,默认为30秒 # # #rabbitmq配置 ( 注意: rabbitmq配置项需在spring的下级 ) # rabbitmq: diff --git a/conf/merchant/application.yml b/conf/merchant/application.yml index 7182436..908776e 100644 --- a/conf/merchant/application.yml +++ b/conf/merchant/application.yml @@ -61,9 +61,16 @@ spring: timeout: 1000 password: -# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) +# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) activemq: - broker-url: tcp://localhost:61616 #连接地址 + broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) #连接地址 + in-memory: false # Jeepay项目不可使用内存模式, 需要连接多个消费者。 + user: system # activeMQ默认无需账密认证。 打开认证:activemq.xml添加simpleAuthenticationPlugin标签,账密在credentials.properties文件。 + password: manager + pool: + enabled: true + max-connections: 10 + idle-timeout: 30000 # 空闲的连接过期时间,默认为30秒 # # #rabbitmq配置 ( 注意: rabbitmq配置项需在spring的下级 ) # rabbitmq: @@ -79,20 +86,6 @@ spring: # producer: # group: JEEPAY-GROUP - #rabbitmq配置 - # rabbitmq: - # addresses: 127.0.0.1:5672 - # username: guest - # password: guest - # dynamic: true - # virtual-host: / - - #rocketmq配置 - # rocketmq: - # name-server: 127.0.0.1:9876 - # producer: - # group: rocket-group - #日志配置参数。 # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 diff --git a/conf/payment/application.yml b/conf/payment/application.yml index a027466..2fa3db0 100644 --- a/conf/payment/application.yml +++ b/conf/payment/application.yml @@ -61,9 +61,16 @@ spring: timeout: 1000 password: -# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) +# #activeMQ配置 ( 注意: activeMQ配置项需在spring的下级 ) activemq: - broker-url: tcp://localhost:61616 #连接地址 + broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) #连接地址 + in-memory: false # Jeepay项目不可使用内存模式, 需要连接多个消费者。 + user: system # activeMQ默认无需账密认证。 打开认证:activemq.xml添加simpleAuthenticationPlugin标签,账密在credentials.properties文件。 + password: manager + pool: + enabled: true + max-connections: 10 + idle-timeout: 30000 # 空闲的连接过期时间,默认为30秒 # # #rabbitmq配置 ( 注意: rabbitmq配置项需在spring的下级 ) # rabbitmq: diff --git a/jeepay-components/jeepay-components-mq/pom.xml b/jeepay-components/jeepay-components-mq/pom.xml index 9d6f3fc..6359e31 100644 --- a/jeepay-components/jeepay-components-mq/pom.xml +++ b/jeepay-components/jeepay-components-mq/pom.xml @@ -34,12 +34,23 @@ - + org.springframework.boot spring-boot-starter-activemq + + org.apache.activemq + activemq-pool + + + + org.messaginghub + pooled-jms + + +