TIBCOSoftware / be-contribution

This repository is to add various contributions across different modules within TIBCO BusinessEvents. It will include contributions by TIBCO BusinessEvents team as well external users/customers/fields teams.
BSD 3-Clause "New" or "Revised" License
0 stars 9 forks source link

Cassandra Store Catalog Function|| BE-Engine doesn't get kill if invalid keyspace is provided #87

Closed praagraw-tibco closed 1 year ago

praagraw-tibco commented 1 year ago

Version Information

Software Version(s)
BusinessEvents 6.3.0
OS Type? NA
OS Version? NA

What is the expected behavior?

BE-Engine should not get started and shut down automatically.

What is the actual behavior?

If invalid keyspace name is provided, exception is thrown for the same but BE-Engine also gets started. Since keyspace is not valid, BE-Engine also should not get started. Please find attached logs for the same.

Please provide log files.

Cass_store_func_Test_invalid_keyspace.log

rakulkar-tibco commented 1 year ago

We are already throwing runtime exception from 'Connect' catalog function.

2023 Apr 03 17:41:45:540 GMT +05 Cass_store_func_Test_invalid_keyspace ERROR [main] - [runtime.service] [inference-class] Got runtime exception while invoking Action com.tibco.cep.runtime.session.impl.RuleFunctionsExecAction@11c25846 Objects <>
java.lang.RuntimeException: Error occurred while connecting to Store with url[10.69.136.106:9042]

Expected behaviour can be achieved by handling this exception in BE code. To shutdown engine - user can make use of Engine.shutdown catalog function.

praagraw-tibco commented 1 year ago

As discussed with Rashmi if exception is thrown for any invalid combination then Engine will remain start, however if customer needs they can use Engine.Shutdown() catalog function inside try catch block in their codebase.