-
Notifications
You must be signed in to change notification settings - Fork 642
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from WeBankFinTech/develop
release eventmesh v1.1.1
- Loading branch information
Showing
18 changed files
with
305 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
1.在eventmesh-emesher 中配置 | ||
|
||
``` | ||
proxy.properties(添加如下配置) | ||
proxy.server.useTls.enabled=true //默认值 false | ||
config env varible | ||
-Dssl.server.protocol=TLSv1.1 //默认值 TLSv1.1 | ||
-Dssl.server.cer=sChat2.jks //把文件放到启动脚本start.sh 指定的conPath目录下 | ||
-Dssl.server.pass=sNetty | ||
``` | ||
|
||
|
||
2.在eventmesh-sdk-java 中配置 | ||
``` | ||
//创建producer | ||
LiteClientConfig liteClientConfig = new liteClientConfig(); | ||
... | ||
//设置开启TLS | ||
liteClientConfig.setUseTls(true); | ||
LiteProducer producer = new LiteProducer(liteClientConfig); | ||
//配置环境变量 | ||
-Dssl.client.protocol=TLSv1.1 //默认值 TLSv1.1 | ||
-Dssl.client.cer=sChat2.jks //把文件放到应用指定的conPath目录下 | ||
-Dssl.client.pass=sNetty | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
1.config in eventmesh-emesher | ||
|
||
``` | ||
proxy.properties(add config as follows) | ||
proxy.server.useTls.enabled=true //default value is false | ||
config env varible | ||
-Dssl.server.protocol=TLSv1.1 //default value is TLSv1.1 | ||
-Dssl.server.cer=sChat2.jks //put the file in confPath which is configured in start.sh | ||
-Dssl.server.pass=sNetty | ||
``` | ||
|
||
|
||
2.config in eventmesh-sdk-java | ||
``` | ||
// create producer | ||
LiteClientConfig liteClientConfig = new liteClientConfig(); | ||
... | ||
// enable TLS | ||
liteClientConfig.setUseTls(true); | ||
LiteProducer producer = new LiteProducer(liteClientConfig); | ||
config env varible | ||
-Dssl.client.protocol=TLSv1.1 //default value is TLSv1.1 | ||
-Dssl.client.cer=sChat2.jks //put the file in confPath of your application | ||
-Dssl.client.pass=sNetty | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## 什么是Event Mesh? | ||
该图显示了Event Mesh相对于应用程序框架中其他类似技术(例如Service Mesh)的定位. | ||
![architecture1](docs/images/eventmesh-define.png) | ||
|
||
Event Mesh是一个动态的插件式云原生基础服务层,用于分离应用程序和中间件层。它提供了灵活,可靠和快速的事件分发,并且可以进行管理: | ||
![architecture1](docs/images/eventmesher.png) | ||
|
||
云原生Event Mesh: | ||
![architecture2](docs/images/bus.png) | ||
|
||
Event Mesh允许将来自一个应用程序的事件动态路由到任何其他应用程序. | ||
Event Mesh的一般功能: | ||
* 事件驱动; | ||
* 事件治理; | ||
* 动态路由; | ||
* 云原生; | ||
|
||
依赖部件: | ||
* 可选1:DeFiBus:具有低延迟,高性能和可靠性,和灵活可伸缩性的分布式消息传递平台 [DeFiBus](https://github.com/WeBankFinTech/DeFiBus) | ||
* 可选2:RocketMQ | ||
|
||
关键部件: | ||
* event mesher:一种中间件,用于在事件产生者和使用者之间传输事件,支持云原生应用程序和微服务 | ||
* sdk:当前支持HTTP和TCP协议,未来会支持gRPC等 | ||
* registry:自动在连接到事件网格的应用程序和服务之间路由事件, 管理event mesher | ||
|
||
|
||
## 开源地址 | ||
* https://github.com/WeBankFinTech/DeFiBus | ||
* https://github.com/WeBankFinTech/EventMesh | ||
* https://gitee.com/WeBank/DeFiBus | ||
* https://gitee.com/WeBank/EventMesh | ||
|
||
欢迎加入社区进行交流 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
# | ||
|
||
group=com.webank.eventmesh | ||
version=1.1.0 | ||
version=1.1.1 | ||
defibus_version=1.0.1 | ||
jdk=1.7 | ||
snapshot=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
APP_START_JVM_OPTION:::-server -Xms128M -Xmx256M -Xmn128m -XX:SurvivorRatio=4 -Duser.language=zh -Dclient.executor.corePoolSize=8 -Dclient.schedule.corePoolSize=4 -Dclient.instance.corePoolSize=4 -Dclient.checkExecutor.corePoolSize=4 -Dclient.rebalanceImpl.corePoolSize=4 -Dclient.rebalanceService.corePoolSize=2 -Dclient.pullMessage.corePoolSize=8 | ||
APP_START_JVM_OPTION:::-server -Xms128M -Xmx256M -Xmn128m -XX:SurvivorRatio=4 -Duser.language=zh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
# | ||
|
||
group=com.webank.eventmesh | ||
version=1.1.0 | ||
version=1.1.1 | ||
defibus_version=1.0.1 | ||
mavenUserName= | ||
mavenPassword= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
eventmesh-emesher/src/main/java/com/webank/emesher/boot/SSLContextFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.webank.emesher.boot; | ||
|
||
import com.webank.emesher.constants.ProxyConstants; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import javax.net.ssl.KeyManagerFactory; | ||
import javax.net.ssl.SSLContext; | ||
import java.io.File; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
import java.nio.file.StandardOpenOption; | ||
import java.security.KeyStore; | ||
|
||
public class SSLContextFactory { | ||
private static Logger httpLogger = LoggerFactory.getLogger("http"); | ||
|
||
private static String protocol = "TLSv1.1"; | ||
|
||
private static String fileName; | ||
|
||
private static String pass; | ||
|
||
|
||
public static SSLContext getSslContext(){ | ||
SSLContext sslContext = null; | ||
try{ | ||
protocol = System.getProperty("ssl.server.protocol", "TLSv1.1"); | ||
|
||
fileName = System.getProperty("ssl.server.cer","sChat2.jks"); | ||
|
||
char[] filePass = null; | ||
pass = System.getProperty("ssl.server.pass","sNetty"); | ||
if(StringUtils.isNotBlank(pass)){ | ||
filePass = pass.toCharArray(); | ||
} | ||
sslContext = SSLContext.getInstance(protocol); | ||
KeyStore keyStore = KeyStore.getInstance("JKS"); | ||
keyStore.load(Files.newInputStream(Paths.get(ProxyConstants.PROXY_CONF_HOME | ||
+ File.separator | ||
+ fileName), StandardOpenOption.READ), filePass); | ||
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); | ||
kmf.init(keyStore, filePass); | ||
sslContext.init(kmf.getKeyManagers(), null, null); | ||
}catch (Exception e){ | ||
httpLogger.warn("sslContext init failed", e); | ||
sslContext = null; | ||
} | ||
return sslContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
# | ||
|
||
group=com.webank.eventmesh | ||
version=1.1.0 | ||
version=1.1.1 | ||
jdk=1.8 | ||
snapshot=false | ||
proxy_common_version=1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.