@ti-engine/core 1.1.10 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,133 +1,145 @@
1
- # ti-engine changelog
2
-
3
- This document will contain the list of changes made to the framework. The format is based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
4
-
5
- ## Version 1.1.10
6
- * fix(cache): fix redis client creation sequence. It is now created inside the constructor as intended. It still needs to be initialized explicitly using the `initialize` method.
7
-
8
- ## Version 1.1.9
9
- * feat(redis integration)!: change the way the `redis` client is initialized. Instead of happening automatically on class instantiation, it is now initialized on demand using the `initialize` method.
10
- * feat(cache): change the way the main cache instance is initialized in compliance with the new redis integration
11
- * feat(message memory cache)!: change the way the message memory cache is initialized in compliance with the new redis integration. The `initialize` method needs to be called explicitly to initialize the cache instance before it can be used.
12
- * fix(message dispatcher): fix the way the `messageExchange` is initialized in the `MessageDispatcher` class (was not returning a promise)
13
-
14
- ## Version 1.1.8
15
- * feat(auditing): change export of the singleton class in an `instance` variable for consistency and clarity
16
- * feat(message dispatcher): change export of the singleton class in an `instance` variable for consistency and clarity
17
- * feat(cache): change export of the singleton class in an `instance` variable for consistency and clarity
18
- * feat(service executor): implement service registration retry policy
19
-
20
- ## Version 1.1.7
21
- * feat(start instance): add support for the detection of `SIGBREAK` events and graceful shutdown on Windows
22
- * feat(service instance)!: prevent the initialization of multiple `ServiceInstance` within the same process
23
- * feat(message tracer)!: covert to singleton instance and add initialization method
24
- * feat(message dispatcher): initialize the message tracer on start before message exchange is enabled
25
- * fix(message tracer): optimize `recordTraceEntry` to not call set JSON command on every request
26
- * fix(gcloud integration): fix the bool conversion of the `TI_GCLOUD_ENABLED` ENV variable
27
- * fix(redis integration): update links to official commands documentation
28
-
29
- ## Version 1.1.6
30
- * feat(start instance): add fail-fast mode as default behavior on promise unhandled rejections
31
- * feat(start instance): implement functionality to derive safe default service domain name when none is provided in the configuration
32
- * feat(config): add support for new ENV variable `TI_FAIL_FAST_ON_UNHANDLED_OFF` that controls the fail-fast mode
33
- * feat(service instance): ensure instance ID naming standard is followed when creating new instances and no ID is provided in the configuration
34
- * feat(redis integration): marked command `hmset` as deprecated (according to official documentation)
35
- * feat(redis integration)!: change redis client default behavior: set to automatically resend all pending commands on connection recovery with no limit on the retry attempts. This behavior cannot be changed. Arguments `autoRetryUnfulfilled` and `maxRetries` have been removed from the constructor
36
- * feat(redis integration)!: add options to configure redis connection retry policy. This can be controlled with two new arguments in the constructor `retryMaxIntervalMs` and `retryMaxAttempts`.
37
- * feat(redis integration)!: improve and extend the behavior of pub/sub implementation functionality. The `subscribeCommand` method can now only subscribe once to the same channel. The client instance will keep a map of all channels it has subscribed to. To unsubscribe, use the `unsubscribeCommand` method
38
- * feat(redis integration): add a `shutDown` method to gracefully close a redis connection. This is now used on instance shut down sequence as well as in the default message sender and receiver implementations
39
- * fix(start instance): fix the logging of reason for unhandled rejections and multiple resolves
40
- * fix(service instance): use the static service domain name to initialize the health check instead of the ENV variable
41
- * fix(redis integration): add detection of ReJSON2 in the verification of JSON support in the redis server
42
- * build(npm): update npm dependencies to their latest versions
43
- * docs: add section about ENV variables to the `README.md` file
44
-
45
- ## Version 1.1.5
46
-
47
- * fix(service instance): add overrides of the `reportHealthy` method in `ServiceConsumer` and `ServiceProvider` classes
48
- * fix(tester): implement `reportHealthy` method
49
- * docs(license): add a `LICENSE` file
50
- * docs(license): change all licensing information in source files to GNU 3.0
51
- * docs: improve the information in `README.md` file
52
-
53
- ## Version 1.1.4
54
-
55
- * feat(service instance): expose method `reportHealthy` and mark it as virtual to allow for overrides with custom health status reporting logic
56
-
57
- ## Version 1.1.3
58
-
59
- * feat(config)!: removed ENV variable `TI_OPERATION_MODE` as it was duplicating the practical purpose of `NODE_ENV`
60
- * feat(config)!: setting `OPERATION_MODE` is now initialized by the `NODE_ENV` ENV variable (if provided)
61
- * feat(service instance): show application operation mode in log at successful startup
62
- * docs: add more sections and information in `README.md`
63
-
64
- ## Version 1.1.2
65
-
66
- * feat(localization): add new functionality for localization based on labels and system language. It is currently utilized by the `exceptions` module for localizing the exception descriptions. The new `localization` module can also be accessed externally in the implementing application's files via standard import
67
- * feat(config): add new setting `localization.labelsPath` that specifies the file path for the localization labels
68
- * feat(config): add new setting `localization.language` that specifies the language to be used for the labels
69
- * feat(config): add new ENV variable `TI_LOCALIZATION_LABELS_PATH` that controls the `localization.labelsPath` setting
70
- * feat(config): add new ENV variable `TI_LOCALIZATION_LANGUAGE` that controls the `localization.language` setting
71
- * feat(logger): log exception label instead of system-level description
72
- * fix(start instance): fix the order of ENV loading in the `start-instance.js` script. It will now properly load the `.env` file first and then proceed with any configuration overrides in `config` module
73
- * fix(service provider): normalize service file paths on dynamic service handler loading
74
- * build(npm): update npm dependencies to their latest versions
75
-
76
- ## Version 1.1.1
77
-
78
- * feat(config): add new ENV variable `TI_AUDITING_LOG_DETAILS` that controls the `auditing.logDetails` setting
79
- * feat(service provider): add a method that returns a list of the currently registered services
80
- * feat(tester service): improved the structure, configuration, and inline docs of tester service
81
- * fix(logger): fix the way Exception is logged when it's a part of the main logging data object
82
- * docs(readme): expanded the general documentation in `README.md` with a new section and improved many of the older sections
83
- * docs: improved some of the JSDoc definitions across the framework
84
-
85
- ## Version 1.1.0
86
-
87
- * feat(redis integration): implement better process for fetching and storing the remote Redis server settings and enabled features
88
- * feat(redis integration): add getter method `serverVersion` that returns the Redis server version
89
- * feat(redis integration): add support for RedisJSON functionality
90
- * feat(redis integration): add getter method `isJSONSupported` to verify if this module is enabled/supported in Redis server
91
- * feat(redis integration): add separate enum for override modes `TiRedisOverrideMode`
92
- * feat(redis integration): add support for executing any single command in Redis that is otherwise unsupported by the underlying framework. Use method `callCommand` for that in case you need to access something more exotic or currently unimplemented
93
- * feat(cache): add support for working with JSON values. Currently supporting operations `set`, `get`, and `append array` with more coming in future versions
94
- * feat(cache): add support for setting manual expiration of values
95
- * feat(message tracer): change log level of trace entries from `DEBUG` to `NOTICE` for all events
96
- * feat(message tracer): add functionality for storing the trace entries in the `cache` in JSON format. This is the default behavior and will always work. Traces can later be retrieved from the `cache` for further processing by specialized application
97
- * feat(message tracer): add new property `traceTimestamp` to the trace entries as it may differ from the actual message timestamp
98
- * feat(config): add new setting `messageExchange.traceExpirationTime` that controls the preservation time for all trace entries. Default is one hour and will be refreshed every time a new trace is generated. Setting this to `0` will disable
99
- expiration altogether
100
- * feat(config): add new setting `messageExchange.traceRepository` that specifies the name of the key in `cache` that will store the trace entries. The default one should be sufficient for most cases
101
- * feat(config): change default of setting `messageExchange.traceLogEnabled` to `false`. With this change trace entries will not be written to the standard log output
102
- * feat(exceptions): add new exception code `1006` as `E_GEN_FEATURE_UNSUPPORTED` to indicate functionality that is unsupported by the system or integrated application
103
- * refactor(config)!: correct the name of the ENV variable controlling `memoryCache.user` to `TI_MEMORY_CACHE_USER` from previous `MEMORY_CACHE_USER`
104
- * build(npm): update npm development dependencies to their latest versions
105
- * docs: update some JSDoc types and other entries to reflect the current state of the code
106
-
107
- ## Version 1.0.14
108
-
109
- * feat(message exchange): improve the behavior of `onConnectionRecovered` and `onConnectionDisrupted` events in modules `cache`, `message-handler` and `service-executor` to prevent cross-activation or deactivation
110
- * feat(redis integration): improve Redis integration for greater stability, support of Redis Cloud, and support for Redis 7
111
- * feat(config): enable setting `auditing.logDetails` by default for all logs
112
- * docs: update general documentation
113
-
114
- ## Version 1.0.13
115
-
116
- * build(npm): update npm dependencies to their latest versions
117
-
118
- ## Version 1.0.12
119
-
120
- * build(npm): update npm dependencies to their latest versions
121
-
122
- ## Version 1.0.11
123
-
124
- * feat(message exchange): implement message tampering and insertion protection
125
- * feat(config): provide option to turn on/off the message tampering and insertion protection
126
- * feat(config): provide option to turn on/off message tracing
127
- * build(npm): update npm dependencies to their latest versions
128
- * refactor(config)!: rename all environment variables that set configuration settings to match their related setting
129
- * docs: add a change log
130
-
131
- ## Version 1.0.0
132
-
1
+ # ti-engine changelog
2
+
3
+ This document will contain the list of changes made to the framework. The format is based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
4
+
5
+ ## Version 1.2.0
6
+ * feat(config)!: change the setting `localization.labelsPath` to be an array of strings. It can now be used to supply any additional custom labels in one or more files to the framework
7
+ * feat(message memory cache): implement graceful exception handling during shut down procedure in `receiveMessage` and `sendMessage` methods
8
+ * fix(default message sender): add missing initialization of the memory cache on enable
9
+ * fix(default message receiver): add missing initialization of the memory cache on enable
10
+ * fix(message receiver): ensure `receive` method is no longer called recursively when the receiver has been disabled
11
+ * fix(redis integration)!: change the way the Redis client is initialized as the previous sequence was leaving unresolved promises and in some cases failed to fetch the Redis server settings. Also, it will now notify the listeners only once when the server settings are fetched and the connection is ready to be used
12
+ * fix(localization)!: change the way system labels are loaded as the previous implementation could cause a critical startup error if the working dir was different from expected
13
+ * fix(package): add the missing main export to the `start-instance.js` script. Without it was impossible to start the framework in specific cases like in a workspaces repository
14
+ * fix(message tracer): exclude `E_GEN_FEATURE_UNSUPPORTED` exception from the initialization of the message tracer exception handler
15
+ * fix(service executor)!: change the individual service registration process to ensure service registration does actually happen before the service provider finishes its initialization
16
+
17
+ ## Version 1.1.10
18
+ * fix(cache): fix redis client creation sequence. It is now created inside the constructor as intended. It still needs to be initialized explicitly using the `initialize` method.
19
+
20
+ ## Version 1.1.9
21
+ * feat(redis integration)!: change the way the `redis` client is initialized. Instead of happening automatically on class instantiation, it is now initialized on demand using the `initialize` method.
22
+ * feat(cache): change the way the main cache instance is initialized in compliance with the new redis integration
23
+ * feat(message memory cache)!: change the way the message memory cache is initialized in compliance with the new redis integration. The `initialize` method needs to be called explicitly to initialize the cache instance before it can be used.
24
+ * fix(message dispatcher): fix the way the `messageExchange` is initialized in the `MessageDispatcher` class (was not returning a promise)
25
+
26
+ ## Version 1.1.8
27
+ * feat(auditing): change export of the singleton class in an `instance` variable for consistency and clarity
28
+ * feat(message dispatcher): change export of the singleton class in an `instance` variable for consistency and clarity
29
+ * feat(cache): change export of the singleton class in an `instance` variable for consistency and clarity
30
+ * feat(service executor): implement service registration retry policy
31
+
32
+ ## Version 1.1.7
33
+ * feat(start instance): add support for the detection of `SIGBREAK` events and graceful shutdown on Windows
34
+ * feat(service instance)!: prevent the initialization of multiple `ServiceInstance` within the same process
35
+ * feat(message tracer)!: covert to singleton instance and add initialization method
36
+ * feat(message dispatcher): initialize the message tracer on start before message exchange is enabled
37
+ * fix(message tracer): optimize `recordTraceEntry` to not call set JSON command on every request
38
+ * fix(gcloud integration): fix the bool conversion of the `TI_GCLOUD_ENABLED` ENV variable
39
+ * fix(redis integration): update links to official commands documentation
40
+
41
+ ## Version 1.1.6
42
+ * feat(start instance): add fail-fast mode as default behavior on promise unhandled rejections
43
+ * feat(start instance): implement functionality to derive safe default service domain name when none is provided in the configuration
44
+ * feat(config): add support for new ENV variable `TI_FAIL_FAST_ON_UNHANDLED_OFF` that controls the fail-fast mode
45
+ * feat(service instance): ensure instance ID naming standard is followed when creating new instances and no ID is provided in the configuration
46
+ * feat(redis integration): marked command `hmset` as deprecated (according to official documentation)
47
+ * feat(redis integration)!: change redis client default behavior: set to automatically resend all pending commands on connection recovery with no limit on the retry attempts. This behavior cannot be changed. Arguments `autoRetryUnfulfilled` and `maxRetries` have been removed from the constructor
48
+ * feat(redis integration)!: add options to configure redis connection retry policy. This can be controlled with two new arguments in the constructor `retryMaxIntervalMs` and `retryMaxAttempts`.
49
+ * feat(redis integration)!: improve and extend the behavior of pub/sub implementation functionality. The `subscribeCommand` method can now only subscribe once to the same channel. The client instance will keep a map of all channels it has subscribed to. To unsubscribe, use the `unsubscribeCommand` method
50
+ * feat(redis integration): add a `shutDown` method to gracefully close a redis connection. This is now used on instance shut down sequence as well as in the default message sender and receiver implementations
51
+ * fix(start instance): fix the logging of reason for unhandled rejections and multiple resolves
52
+ * fix(service instance): use the static service domain name to initialize the health check instead of the ENV variable
53
+ * fix(redis integration): add detection of ReJSON2 in the verification of JSON support in the redis server
54
+ * build(npm): update npm dependencies to their latest versions
55
+ * docs: add section about ENV variables to the `README.md` file
56
+
57
+ ## Version 1.1.5
58
+
59
+ * fix(service instance): add overrides of the `reportHealthy` method in `ServiceConsumer` and `ServiceProvider` classes
60
+ * fix(tester): implement `reportHealthy` method
61
+ * docs(license): add a `LICENSE` file
62
+ * docs(license): change all licensing information in source files to GNU 3.0
63
+ * docs: improve the information in `README.md` file
64
+
65
+ ## Version 1.1.4
66
+
67
+ * feat(service instance): expose method `reportHealthy` and mark it as virtual to allow for overrides with custom health status reporting logic
68
+
69
+ ## Version 1.1.3
70
+
71
+ * feat(config)!: removed ENV variable `TI_OPERATION_MODE` as it was duplicating the practical purpose of `NODE_ENV`
72
+ * feat(config)!: setting `OPERATION_MODE` is now initialized by the `NODE_ENV` ENV variable (if provided)
73
+ * feat(service instance): show application operation mode in log at successful startup
74
+ * docs: add more sections and information in `README.md`
75
+
76
+ ## Version 1.1.2
77
+
78
+ * feat(localization): add new functionality for localization based on labels and system language. It is currently utilized by the `exceptions` module for localizing the exception descriptions. The new `localization` module can also be accessed externally in the implementing application's files via standard import
79
+ * feat(config): add new setting `localization.labelsPath` that specifies the file path for the localization labels
80
+ * feat(config): add new setting `localization.language` that specifies the language to be used for the labels
81
+ * feat(config): add new ENV variable `TI_LOCALIZATION_LABELS_PATH` that controls the `localization.labelsPath` setting
82
+ * feat(config): add new ENV variable `TI_LOCALIZATION_LANGUAGE` that controls the `localization.language` setting
83
+ * feat(logger): log exception label instead of system-level description
84
+ * fix(start instance): fix the order of ENV loading in the `start-instance.js` script. It will now properly load the `.env` file first and then proceed with any configuration overrides in `config` module
85
+ * fix(service provider): normalize service file paths on dynamic service handler loading
86
+ * build(npm): update npm dependencies to their latest versions
87
+
88
+ ## Version 1.1.1
89
+
90
+ * feat(config): add new ENV variable `TI_AUDITING_LOG_DETAILS` that controls the `auditing.logDetails` setting
91
+ * feat(service provider): add a method that returns a list of the currently registered services
92
+ * feat(tester service): improved the structure, configuration, and inline docs of tester service
93
+ * fix(logger): fix the way Exception is logged when it's a part of the main logging data object
94
+ * docs(readme): expanded the general documentation in `README.md` with a new section and improved many of the older sections
95
+ * docs: improved some of the JSDoc definitions across the framework
96
+
97
+ ## Version 1.1.0
98
+
99
+ * feat(redis integration): implement better process for fetching and storing the remote Redis server settings and enabled features
100
+ * feat(redis integration): add getter method `serverVersion` that returns the Redis server version
101
+ * feat(redis integration): add support for RedisJSON functionality
102
+ * feat(redis integration): add getter method `isJSONSupported` to verify if this module is enabled/supported in Redis server
103
+ * feat(redis integration): add separate enum for override modes `TiRedisOverrideMode`
104
+ * feat(redis integration): add support for executing any single command in Redis that is otherwise unsupported by the underlying framework. Use method `callCommand` for that in case you need to access something more exotic or currently unimplemented
105
+ * feat(cache): add support for working with JSON values. Currently supporting operations `set`, `get`, and `append array` with more coming in future versions
106
+ * feat(cache): add support for setting manual expiration of values
107
+ * feat(message tracer): change log level of trace entries from `DEBUG` to `NOTICE` for all events
108
+ * feat(message tracer): add functionality for storing the trace entries in the `cache` in JSON format. This is the default behavior and will always work. Traces can later be retrieved from the `cache` for further processing by specialized application
109
+ * feat(message tracer): add new property `traceTimestamp` to the trace entries as it may differ from the actual message timestamp
110
+ * feat(config): add new setting `messageExchange.traceExpirationTime` that controls the preservation time for all trace entries. Default is one hour and will be refreshed every time a new trace is generated. Setting this to `0` will disable
111
+ expiration altogether
112
+ * feat(config): add new setting `messageExchange.traceRepository` that specifies the name of the key in `cache` that will store the trace entries. The default one should be sufficient for most cases
113
+ * feat(config): change default of setting `messageExchange.traceLogEnabled` to `false`. With this change trace entries will not be written to the standard log output
114
+ * feat(exceptions): add new exception code `1006` as `E_GEN_FEATURE_UNSUPPORTED` to indicate functionality that is unsupported by the system or integrated application
115
+ * refactor(config)!: correct the name of the ENV variable controlling `memoryCache.user` to `TI_MEMORY_CACHE_USER` from previous `MEMORY_CACHE_USER`
116
+ * build(npm): update npm development dependencies to their latest versions
117
+ * docs: update some JSDoc types and other entries to reflect the current state of the code
118
+
119
+ ## Version 1.0.14
120
+
121
+ * feat(message exchange): improve the behavior of `onConnectionRecovered` and `onConnectionDisrupted` events in modules `cache`, `message-handler` and `service-executor` to prevent cross-activation or deactivation
122
+ * feat(redis integration): improve Redis integration for greater stability, support of Redis Cloud, and support for Redis 7
123
+ * feat(config): enable setting `auditing.logDetails` by default for all logs
124
+ * docs: update general documentation
125
+
126
+ ## Version 1.0.13
127
+
128
+ * build(npm): update npm dependencies to their latest versions
129
+
130
+ ## Version 1.0.12
131
+
132
+ * build(npm): update npm dependencies to their latest versions
133
+
134
+ ## Version 1.0.11
135
+
136
+ * feat(message exchange): implement message tampering and insertion protection
137
+ * feat(config): provide option to turn on/off the message tampering and insertion protection
138
+ * feat(config): provide option to turn on/off message tracing
139
+ * build(npm): update npm dependencies to their latest versions
140
+ * refactor(config)!: rename all environment variables that set configuration settings to match their related setting
141
+ * docs: add a change log
142
+
143
+ ## Version 1.0.0
144
+
133
145
  * feat: create initial version of the framework
package/README.md CHANGED
@@ -395,9 +395,9 @@ GCLOUD_PROJECT_ID (Alpha)
395
395
  : This setting holds the project ID for the GCloud integration module.
396
396
 
397
397
  LOCALIZATION_LABELS_PATH
398
- : JSON path `localization.labelsPath`, type `string`, default `../core/bin/localization/labels.json`
398
+ : JSON path `localization.labelsPath`, type `Array<string>`, default `[]`
399
399
  : ENV variable `TI_LOCALIZATION_LABELS_PATH`
400
- : This setting holds the file system path to the `.json` file containing the localization information. By default, the framework provides such a file with english texts that can be customized further. Alternatively, you can provide your own file from a different location, but it still has to follow the rules of the `localization` module.
400
+ : This setting holds a list of paths to custom `.json` files containing additional localization information. By default, the framework also provides such a file with english texts that can be customized further. All additional JSONs in these files have to follow the rules and structure of the `localization` module.
401
401
 
402
402
  LOCALIZATION_LANGUAGE
403
403
  : JSON path `localization.language`, type `string`, default `en`
@@ -1,65 +1,65 @@
1
- {
2
- "labels": {
3
- "general": {
4
- "exceptions": {
5
- "0": {
6
- "en": "Unidentified error encountered or unrecognized exception code provided."
7
- },
8
- "1000": {
9
- "en": "Error thrown by internal JS source."
10
- },
11
- "1001": {
12
- "en": "Attempt to construct an abstract class detected."
13
- },
14
- "1002": {
15
- "en": "Attempt to call an abstract method detected."
16
- },
17
- "1003": {
18
- "en": "Invalid or no service domain name provided at microservice startup."
19
- },
20
- "1004": {
21
- "en": "The system cache required for proper engine operation is unavailable."
22
- },
23
- "1005": {
24
- "en": "The provided service handler is not a proper function."
25
- },
26
- "1006": {
27
- "en": "The requested feature is not supported by current configuration or version."
28
- },
29
- "2000": {
30
- "en": "Invalid authorization token provided."
31
- },
32
- "2001": {
33
- "en": "Invalid or expired session encountered."
34
- },
35
- "2002": {
36
- "en": "Attempt for unauthorized access detected."
37
- },
38
- "2003": {
39
- "en": "The system detected tampering with the message received via message exchange."
40
- },
41
- "3000": {
42
- "en": "General error during cross-application communication."
43
- },
44
- "3001": {
45
- "en": "The message sender instance is currently unavailable."
46
- },
47
- "3002": {
48
- "en": "The execution of a service could not complete within the allowed timeout."
49
- },
50
- "3003": {
51
- "en": "The specified service is not found in the service registry."
52
- },
53
- "3004": {
54
- "en": "The specified service is not found in the service definition interface."
55
- },
56
- "3005": {
57
- "en": "No handler found in the interface for the specified service or service version."
58
- },
59
- "3010": {
60
- "en": "Connection retry attempts exceeded the configured limit."
61
- }
62
- }
63
- }
64
- }
1
+ {
2
+ "labels": {
3
+ "general": {
4
+ "exceptions": {
5
+ "0": {
6
+ "en": "Unidentified error encountered or unrecognized exception code provided."
7
+ },
8
+ "1000": {
9
+ "en": "Error thrown by internal JS source."
10
+ },
11
+ "1001": {
12
+ "en": "Attempt to construct an abstract class detected."
13
+ },
14
+ "1002": {
15
+ "en": "Attempt to call an abstract method detected."
16
+ },
17
+ "1003": {
18
+ "en": "Invalid or no service domain name provided at microservice startup."
19
+ },
20
+ "1004": {
21
+ "en": "The system cache required for proper engine operation is unavailable."
22
+ },
23
+ "1005": {
24
+ "en": "The provided service handler is not a proper function."
25
+ },
26
+ "1006": {
27
+ "en": "The requested feature is not supported by current configuration or version."
28
+ },
29
+ "2000": {
30
+ "en": "Invalid authorization token provided."
31
+ },
32
+ "2001": {
33
+ "en": "Invalid or expired session encountered."
34
+ },
35
+ "2002": {
36
+ "en": "Attempt for unauthorized access detected."
37
+ },
38
+ "2003": {
39
+ "en": "The system detected tampering with the message received via message exchange."
40
+ },
41
+ "3000": {
42
+ "en": "General error during cross-application communication."
43
+ },
44
+ "3001": {
45
+ "en": "The message sender instance is currently unavailable."
46
+ },
47
+ "3002": {
48
+ "en": "The execution of a service could not complete within the allowed timeout."
49
+ },
50
+ "3003": {
51
+ "en": "The specified service is not found in the service registry."
52
+ },
53
+ "3004": {
54
+ "en": "The specified service is not found in the service definition interface."
55
+ },
56
+ "3005": {
57
+ "en": "No handler found in the interface for the specified service or service version."
58
+ },
59
+ "3010": {
60
+ "en": "Connection retry attempts exceeded the configured limit."
61
+ }
62
+ }
63
+ }
64
+ }
65
65
  }
package/bin/settings.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "projectID": ""
13
13
  },
14
14
  "localization": {
15
- "labelsPath": "../core/bin/localization/labels.json",
15
+ "labelsPath": [],
16
16
  "language": "en"
17
17
  },
18
18
  "memoryCache": {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * The ti-engine is an open source, free to use—both for personal and commercial projects—framework for the creation of microservice-based solutions using node.js.
3
- * Copyright © 2021-2023 Boris Kostadinov <kostadinov.boris@gmail.com>
3
+ * Copyright © 2021-2025 Boris Kostadinov <kostadinov.boris@gmail.com>
4
4
  * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5
5
  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
6
6
  * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -43,8 +43,13 @@ class DefaultMessageReceiver extends MessageReceiver {
43
43
  return new Promise( ( resolve, reject ) => {
44
44
  this.#memoryCache = memoryCache.create( this.connectionIdentifier );
45
45
  this.#memoryCache.addConnectionObserver( this );
46
- this.receive();
47
- resolve();
46
+ this.#memoryCache.initialize().then( () => {
47
+ this.isReceiving = true;
48
+ this.receive();
49
+ resolve();
50
+ } ).catch( ( error ) => {
51
+ reject( exceptions.raise( error ) );
52
+ } );
48
53
  } );
49
54
  }
50
55
 
@@ -60,6 +65,7 @@ class DefaultMessageReceiver extends MessageReceiver {
60
65
  return new Promise( ( resolve, reject ) => {
61
66
  this.isAvailable = false;
62
67
  this.#memoryCache.shutDown().then( () => {
68
+ this.isReceiving = false;
63
69
  this.#memoryCache = null;
64
70
  resolve();
65
71
  } ).catch( ( error ) => {
@@ -80,6 +86,7 @@ class DefaultMessageReceiver extends MessageReceiver {
80
86
  */
81
87
  onReceive() {
82
88
  return new Promise( ( resolve, reject ) => {
89
+ // NOTE: The method execution will block on this call until a message is received:
83
90
  this.#memoryCache.receiveMessage( this.receiveQueue ).then( ( lightweightMessage ) => {
84
91
  return this.#memoryCache.retrieveMessagePayload( lightweightMessage, config.getSetting( config.setting.MESSAGE_EXCHANGE_MESSAGE_STORE ) );
85
92
  } ).then( ( message ) => {
@@ -92,4 +99,4 @@ class DefaultMessageReceiver extends MessageReceiver {
92
99
 
93
100
  }
94
101
 
95
- module.exports = DefaultMessageReceiver;
102
+ module.exports = DefaultMessageReceiver;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * The ti-engine is an open source, free to use—both for personal and commercial projects—framework for the creation of microservice-based solutions using node.js.
3
- * Copyright © 2021-2023 Boris Kostadinov <kostadinov.boris@gmail.com>
3
+ * Copyright © 2021-2025 Boris Kostadinov <kostadinov.boris@gmail.com>
4
4
  * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5
5
  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
6
6
  * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -34,7 +34,7 @@ class DefaultMessageSender extends MessageSender {
34
34
  /**
35
35
  * Used to perform the actual sending of a message.
36
36
  * <br/>
37
- * NOTE: The default message exchange works with lightweight messages (i.e. will keep the payloads stored in Redis while exchanging).
37
+ * NOTE: The default message exchange works with lightweight messages (i.e., will keep the payloads stored in Redis while exchanging).
38
38
  *
39
39
  * @method
40
40
  * @param {Message} message The message to send.
@@ -69,7 +69,11 @@ class DefaultMessageSender extends MessageSender {
69
69
  return new Promise( ( resolve, reject ) => {
70
70
  this.#memoryCache = memoryCache.create( this.connectionIdentifier );
71
71
  this.#memoryCache.addConnectionObserver( this );
72
- resolve();
72
+ this.#memoryCache.initialize().then( () => {
73
+ resolve();
74
+ } ).catch( ( error ) => {
75
+ reject( exceptions.raise( error ) );
76
+ } );
73
77
  } );
74
78
  }
75
79
 
@@ -94,4 +98,4 @@ class DefaultMessageSender extends MessageSender {
94
98
  }
95
99
  }
96
100
 
97
- module.exports = DefaultMessageSender;
101
+ module.exports = DefaultMessageSender;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * The ti-engine is an open source, free to use—both for personal and commercial projects—framework for the creation of microservice-based solutions using node.js.
3
- * Copyright © 2021-2023 Boris Kostadinov <kostadinov.boris@gmail.com>
3
+ * Copyright © 2021-2025 Boris Kostadinov <kostadinov.boris@gmail.com>
4
4
  * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5
5
  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
6
6
  * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
@@ -170,7 +170,7 @@ class MessageHandler extends ConnectionObserver {
170
170
  }
171
171
 
172
172
  /**
173
- * An event-triggered method that will notify any observers about primary connection disrupted state.
173
+ * An event-triggered method that will notify any observers about the primary connection disrupted state.
174
174
  * <br/>
175
175
  * NOTE: You can override this to add custom functionality but make sure to also call the base method
176
176
  * using: super.onConnectionDisrupted( identifier )
@@ -191,4 +191,4 @@ class MessageHandler extends ConnectionObserver {
191
191
 
192
192
  }
193
193
 
194
- module.exports = MessageHandler;
194
+ module.exports = MessageHandler;