diff --git a/README.md b/README.md
index 6e828a248..4c678b933 100644
--- a/README.md
+++ b/README.md
@@ -13,12 +13,14 @@ WeEvent由微众银行自主研发并完全开源,秉承分布式商业模式
### 快速入门
- 安装前置依赖
- 区块链是`WeEvent`的前置依赖,用户需要提前安装,具体操作见[FISCO-BCOS文档](https://fisco-bcos-documentation.readthedocs.io/zh_CN/release-1.3/docs/tools/index.html)。
+ 在体验WeEvent之前,用户需提前搭建好区块链,WeEvent现已支持FISCO BCOS区块链底层平台,具体操作见[FISCO-BCOS文档](https://fisco-bcos-documentation.readthedocs.io/zh_CN/release-1.3/docs/tools/index.html)。
- 搭建服务
+
快速搭建一套`WeEvent`服务,请参考[文档](https://weeventdoc.readthedocs.io/zh_CN/latest/install/quickinstall.html)。通过一键部署的`WeEvent`服务,用户可以快速体验和开发。
- 体验订阅
+
参见[更多代码样例](https://github.com/WeBankFinTech/WeEvent/tree/master/src/test/java/com/webank/weevent/sample)。
diff --git a/dist/broker.sh b/dist/broker.sh
index 0a22b262d..fd5d8eee6 100644
--- a/dist/broker.sh
+++ b/dist/broker.sh
@@ -20,7 +20,7 @@ start(){
echo "broker is running, (PID=$currentbroker_pid)"
else
nohup java ${JAVA_OPTS} -Xbootclasspath/a:./conf -jar ./apps/* >/dev/null 2>&1 &
- sleep 1
+ sleep 3
eventbroker_pid=$!
if [ -n "$eventbroker_pid" ];then
echo "start broker success (PID=$eventbroker_pid)"
@@ -28,7 +28,7 @@ start(){
echo "${eventbroker_pid}" >$brokerpid_path
else
touch $brokerpid_path;
- sleep 1
+ sleep 3
echo "${eventbroker_pid}" >$brokerpid_path
fi
diff --git a/dist/conf/application-dev.properties b/dist/conf/application-dev.properties
deleted file mode 100644
index 6e4f9a0d4..000000000
--- a/dist/conf/application-dev.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-spring.application.name=weevent-broker
-#web container
-server.port=8081
-server.servlet.context-path=/weevent
-#https
-server.ssl.enabled=false
-server.ssl.key-store=classpath:server.p12
-server.ssl.key-store-password=123456
-server.ssl.keyStoreType=PKCS12
-server.ssl.keyAlias=weevent
-#force to utf8
-server.tomcat.uri-encoding=UTF-8
-spring.http.encoding.charset=UTF-8
-spring.http.encoding.enabled=true
-spring.http.encoding.force=true
-spring.messages.encoding=UTF-8
-spring.pid.fail-on-write-error=true
-spring.pid.file=./logs/broker.pid
-#change not found uri status from 404 to exception
-spring.mvc.throw-exception-if-no-handler-found=true
-spring.resources.add-mappings=false
-#actuator, eg. http://localhost:8080/weevent/actuator/beans
-#* means info,health,beans,conditions,configprops,scheduledtasks,threaddump,metrics,env,httptrace,auditevents
-management.endpoints.web.exposure.include=*
-management.endpoint.health.show-details=always
-management.endpoint.shutdown.enabled=false
\ No newline at end of file
diff --git a/dist/conf/application-prod.properties b/dist/conf/application-prod.properties
deleted file mode 100644
index 1baa0e50a..000000000
--- a/dist/conf/application-prod.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-spring.application.name=weevent-broker
-#web container
-server.port=8081
-server.servlet.context-path=/weevent
-#https
-server.ssl.enabled=false
-server.ssl.key-store=classpath:server.p12
-server.ssl.key-store-password=123456
-server.ssl.keyStoreType=PKCS12
-server.ssl.keyAlias=weevent
-#force to utf8
-server.tomcat.uri-encoding=UTF-8
-spring.http.encoding.charset=UTF-8
-spring.http.encoding.enabled=true
-spring.http.encoding.force=true
-spring.messages.encoding=UTF-8
-spring.pid.fail-on-write-error=true
-spring.pid.file=./logs/broker.pid
-#change not found uri status from 404 to exception
-spring.mvc.throw-exception-if-no-handler-found=true
-spring.resources.add-mappings=false
-#actuator
-management.endpoints.web.exposure.include=info
-management.endpoint.shutdown.enabled=false
-management.endpoint.health.show-details=always
-#performance
-spring.application.admin.enabled=false
\ No newline at end of file
diff --git a/dist/conf/application.properties b/dist/conf/application.properties
deleted file mode 100644
index 257b30648..000000000
--- a/dist/conf/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-spring.profiles.active=dev
\ No newline at end of file
diff --git a/dist/conf/applicationContext.xml b/dist/conf/applicationContext.xml
deleted file mode 100644
index fc5bc862c..000000000
--- a/dist/conf/applicationContext.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dist/conf/banner.txt b/dist/conf/banner.txt
deleted file mode 100644
index 18164d4e4..000000000
--- a/dist/conf/banner.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
- __ __ _____ _ ____ _ _
- \ \ / /__| ____|_ _____ _ __ | |_ | __ ) _ __ ___ | | _____ _ __| |
- \ \ /\ / / _ \ _| \ \ / / _ \ '_ \| __| | _ \| '__/ _ \| |/ / _ \ '__| |
- \ V V / __/ |___ \ V / __/ | | | |_ | |_) | | | (_) | < __/ | |_|
- \_/\_/ \___|_____| \_/ \___|_| |_|\__| |____/|_| \___/|_|\_\___|_| (_)
-
diff --git a/dist/conf/ca.crt b/dist/conf/ca.crt
deleted file mode 100644
index e5b2fbcb8..000000000
--- a/dist/conf/ca.crt
+++ /dev/null
@@ -1,43 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDnzCCAoegAwIBAgIJAN0m+EAQLWPmMA0GCSqGSIb3DQEBCwUAMGYxCzAJBgNV
-BAMMAkNOMQswCQYDVQQGEwJDTjESMBAGA1UECAwJR3Vhbmdkb25nMREwDwYDVQQH
-DAhTaGVuemhlbjETMBEGA1UECgwKRklTQ08tQkNPUzEOMAwGA1UECwwFY2hhaW4w
-HhcNMTkwMTMxMDMwNjUwWhcNMjkwMTI4MDMwNjUwWjBmMQswCQYDVQQDDAJDTjEL
-MAkGA1UEBhMCQ04xEjAQBgNVBAgMCUd1YW5nZG9uZzERMA8GA1UEBwwIU2hlbnpo
-ZW4xEzARBgNVBAoMCkZJU0NPLUJDT1MxDjAMBgNVBAsMBWNoYWluMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9Pl1x49pNEG0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cNMTkwMTMxMDMwNjUwWhcNMjkwMTI4MDMwNjUwWjBmMQswCQYDVQQDDAJDTjEL
-MAkGA1UEBhMCQ04xEjAQBgNVBAgMCUd1YW5nZG9uZzERMA8GA1UEBwwIU2hlbnpo
-ZW4xEzARBgNVBAoMCkZJU0NPLUJDT1MxDjAMBgNVBAsMBWFnZW50MIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzLzmVvU4v6/aaFW7lTCI5mRi1YDAg9pX
-cZn/dKBF/xHLEjJE0fknnRAC3x3K5BW0FtGWorsNQ8ezoSu9AwRzt0Cb/IvXQeiu
-vETcoC8YBoSETt9wL1S+NIGdIr4B4D+SyaOJsyw5lkvL3Qpq9Wo8w196BUC07/uH
-NsYTyB7rsujaRib9cE3ZFCdJQAVmx9/gLVGrYE7kdKi0mLUMpyy7qiNY42GyrqCy
-7R/nZF8DWVmb1/rmTbxSeYB11ebl0xIIJiinVRBGgx+VOwCm21hA0SHnZ5fZwNag
-ztD2H9lIokgBLUduRrTtSZJpGQGuQxl7HySLXLxV4PatgorK8uMWbwIDAQABoxAw
-DjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAyAKRXlRLqeuPneAGr
-mSO7Rn/MMyzkxsWvbwHymSHeBOJp+j2OBqIBX0+muqB135+6JzcrovrVM9rLqso+
-Efq97hnknp2SA9fR9ko+hQkNGaODpu1MWVW5cqO3TTNqnMKOpEV+NRuhnZImmGPB
-hG7F90cSTB6JmNPP8eyOymdSB1F1poghRUNWo6/0PxOevHpBpmllL1MofWrgxG2B
-vwfDV6sMr5Ka+/5KXOTVuR4FODA4lvZ2ZtcUF/hrlmkX3+z4tCY30XPecaqnayX6
-/bXgf7Rdt60mvFVPPuNjHtpCb0SBcbbf6GvpxdhOBsJGCz0WzmoM2OFs/SuYx5K5
-kaTh
------END CERTIFICATE-----
diff --git a/dist/conf/client.keystore b/dist/conf/client.keystore
deleted file mode 100644
index 657ec1aa2..000000000
Binary files a/dist/conf/client.keystore and /dev/null differ
diff --git a/dist/conf/log4j.properties b/dist/conf/log4j.properties
deleted file mode 100644
index 3348b1ef3..000000000
--- a/dist/conf/log4j.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-log4j.rootLogger=INFO,file
-log-format=%-d{yyyy-MM-dd HH:mm:ss.SSS} %5p [%t] [%F:%L %C.%M] %m%n
-#console log
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=DEBUG
-log4j.appender.console.Target=System.out
-log4j.appender.console.Encoding=UTF-8
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=${log-format}
-#file log, org.apache.log4j.DailyRollingFileAppender DO NOT support MaxFileSize
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.Threshold=DEBUG
-log4j.appender.file.File=./logs/event-broker.log
-#TODO date in file name
-#log4j.appender.file.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
-#log4j.appender.file.rollingPolicy.FileNamePattern=./logs/event-broker_%d{yyyy-MM-dd-HH}.log
-log4j.appender.file.ImmediateFlush=true
-log4j.appender.file.MaxFileSize=100MB
-log4j.appender.file.Append=true
-log4j.appender.file.Encoding=UTF-8
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=${log-format}
diff --git a/dist/conf/log4j2.xml b/dist/conf/log4j2.xml
deleted file mode 100644
index 24c3bad2c..000000000
--- a/dist/conf/log4j2.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- ./logs/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dist/conf/server.p12 b/dist/conf/server.p12
deleted file mode 100644
index 8138bfb29..000000000
Binary files a/dist/conf/server.p12 and /dev/null differ
diff --git a/src/main/java/com/webank/weevent/broker/fisco/util/Web3sdkUtils.java b/src/main/java/com/webank/weevent/broker/fisco/util/Web3sdkUtils.java
index 6fc1894f2..25a92fd5b 100644
--- a/src/main/java/com/webank/weevent/broker/fisco/util/Web3sdkUtils.java
+++ b/src/main/java/com/webank/weevent/broker/fisco/util/Web3sdkUtils.java
@@ -205,6 +205,7 @@ public static void main(String[] args) {
}
} catch (Exception e) {
e.printStackTrace();
+ System.exit(1);
}
// web3sdk can't exit gracefully
diff --git a/src/test/java/com/webank/weevent/sample/Stomp.java b/src/test/java/com/webank/weevent/sample/Stomp.java
index 73ea6b840..4fd5820f7 100644
--- a/src/test/java/com/webank/weevent/sample/Stomp.java
+++ b/src/test/java/com/webank/weevent/sample/Stomp.java
@@ -89,9 +89,9 @@ public void handleException(StompSession session, StompCommand command, StompHea
@Override
public void handleTransportError(StompSession session, Throwable exception) {
- if (exception instanceof ConnectionLostException) {
+ if (exception instanceof ConnectionLostException||!isConnected) {
log.info("connection closed, {}", session.getSessionId());
-
+ isConnected=false;
// do auto reconnect in this handle
while (!isConnected) try {
// retry every 3 seconds