Skip to content

Commit

Permalink
KafkaBackendFix (state initialisation) and exit JVM if exception if r…
Browse files Browse the repository at this point in the history
…aised (#386)

* ammend wrong state initialization in the kafka backend

* terminate jvm if there is an execution
  • Loading branch information
purbon committed Dec 9, 2021
1 parent 1a6be02 commit 5b2b441
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@ private Options buildOptions() {
return options;
}

public static void main(String[] args) throws Exception {
public static void main(String[] args) {
CommandLineInterface cli = new CommandLineInterface();
cli.run(args);
exit(0);
try {
cli.run(args);
exit(0);
} catch (Exception ex) {
ex.printStackTrace();
exit(1);
}
}

public void run(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void run() {
@Override
public void configure(Configuration config) {
instanceId = config.getJulieInstanceId();
latest = new AtomicReference<>();
latest = new AtomicReference<>(new BackendState());

consumer = new KafkaBackendConsumer(config);
consumer.configure();
Expand Down

0 comments on commit 5b2b441

Please sign in to comment.