Skip to content

Commit

Permalink
延时一秒,依然会有连接RabbitMQ失败的情况,因此增加RabbitMQ消费者应用启动的延时到6秒
Browse files Browse the repository at this point in the history
  • Loading branch information
zq2599 committed May 13, 2018
1 parent 2cb9956 commit 9267243
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rabbitmq_docker_files/cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
- mq.rabbit.username=admin
- mq.rabbit.password=888888
consumer1:
image: bolingcavalry/rabbitmqconsumer:0.0.3-SNAPSHOT
image: bolingcavalry/rabbitmqconsumer:0.0.5-SNAPSHOT
hostname: consumer1
depends_on:
- producer
Expand All @@ -60,7 +60,7 @@ services:
- mq.rabbit.password=888888
- mq.rabbit.queue.name=consumer1.queue
consumer2:
image: bolingcavalry/rabbitmqconsumer:0.0.3-SNAPSHOT
image: bolingcavalry/rabbitmqconsumer:0.0.5-SNAPSHOT
hostname: consumer2
depends_on:
- consumer1
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq_docker_files/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Docker file for rabbitmq single or cluster from bolingcavalry
# VERSION 0.0.1
# VERSION 0.0.3
# Author: bolingcavalry

#基础镜像
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq_docker_files/single/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ producer:
- mq.rabbit.username=admin
- mq.rabbit.password=888888
consumer:
image: bolingcavalry/rabbitmqconsumer:0.0.3-SNAPSHOT
image: bolingcavalry/rabbitmqconsumer:0.0.5-SNAPSHOT
hostname: consumer
links:
- rabbitmq:rabbitmqhost
Expand Down
2 changes: 1 addition & 1 deletion rabbitmqconsumer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.bolingcavalry</groupId>
<artifactId>rabbitmqconsumer</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.5-SNAPSHOT</version>
<packaging>jar</packaging>

<name>rabbitmqconsumer</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void main(String[] args) {
因此,在此加一个延时,晚一点启动应用,等待docker将环境变量设置完毕
*/
try{
Thread.sleep(1000);
Thread.sleep(6000);
}catch(Exception e){
e.printStackTrace();
}
Expand Down

0 comments on commit 9267243

Please sign in to comment.