Skip to content

Commit

Permalink
R2.0.2
Browse files Browse the repository at this point in the history
Minor patch to properly handle message producer unexpected session terminate state in SolacePublishingService.
  • Loading branch information
RobertOttesen committed Mar 19, 2024
1 parent ca450c7 commit 0131d59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.solace.swim</groupId>
<artifactId>swim-feed-handler</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<name>swim-feed-handler</name>
<description>SWIM Feed Handler Spring Boot Application</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,16 @@ public void invoke(Message<?> message) {

properties = null;
logger.info("Published message id {} to topic {}.", message.getHeaders().get("jms_messageId"), topic.getName());
} catch (Exception ex) {
} catch (IllegalStateException ex) {
logger.error("Error in state of publisher. Trying to recover...");
if (!messagePublisher.isTerminated()) {
messagePublisher.terminate(100);
}
messagingService.disconnect();
init();
invoke(message);
}
catch (Exception ex) {
logger.error("Unable to send message", ex);
}
}
Expand Down

0 comments on commit 0131d59

Please sign in to comment.