Skip to content

Commit

Permalink
release 1.10.0.1-jdk17
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhongjia committed Jan 4, 2024
1 parent 5ddf378 commit 9dc90d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ public void init(Properties keyValue) throws Exception {
this.connection = getConnection();
this.channel = getChannel();
this.rabbitmqConsumerHandler = new RabbitmqConsumerHandler(channel, configurationHolder,
isBroadcast ? consumerGroup : configurationHolder.getQueueName(),this);
isBroadcast ? consumerGroup : configurationHolder.getQueueName(), this);
}

public Channel reConnectChannel() throws Exception {
if (isClosed()) {
return null;
}
this.connection = getConnection();
this.channel = getChannel();
return this.channel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public RabbitmqConsumerHandler(Channel channel, ConfigurationHolder configuratio
public void run() {
while (!stop.get()) {
try {
if (!stop.get() && consumer.isStarted() && !channel.isOpen()) {
this.channel = consumer.reConnectChannel();
}
GetResponse response = channel.basicGet(queueName, configurationHolder.isAutoAck());
if (response != null) {
RabbitmqCloudEvent rabbitmqCloudEvent = RabbitmqCloudEvent.getFromByteArray(response.getBody());
Expand All @@ -73,13 +76,6 @@ public void commit(EventMeshAction action) {
}
} catch (Exception ex) {
log.error("[RabbitmqConsumerHandler] thread run happen exception.", ex);
if (!stop.get()) {
try {
this.channel = consumer.reConnectChannel();
} catch (Exception e) {
log.error("[RabbitmqConsumerHandler] reconnect error.", e);
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
jdk=17
snapshot=false
group=org.apache.eventmesh
version=1.10.0-jdk17-release
version=1.10.0.1-jdk17-release
#last eight bits of public key
signing.keyId=
#passphrase for key pairs
Expand Down

0 comments on commit 9dc90d2

Please sign in to comment.