v0.16.0
🚀 New Features
-
Batch processing of Tasks:
Enables efficient handling of operations that benefit from bulk processing, such as sending emails, updating databases, or calling external APIs. Tasks with the samebatchKeyin their metadata are processed together in a single batch. -
In-Memory implementation for testing:
The internal message exchange is now fully abstracted, paving the way for potential future support of alternative message brokers. This version introduces an in-memory implementation, ideal for testing purposes, allowing tests to run without the need for a Pulsar cluster. -
Enhanced Event Listener:
Infinitic introduces a more powerful way to monitor internal events. This feature can be used to trigger external actions or send events to analytics databases for dashboard creation. The event listener now automatically detects existing Services and Workflows, listening to their events. All events are now processed in batches for improved efficiency. -
Improved Development Logging:
To address the challenges of debugging distributed systems, Infinitic now offers a streamlined method for viewing CloudEvents during development. Simply set the log level to DEBUG for these classes:- io.infinitic.cloudEvents.WorkflowStateEngine.$workflowName
- io.infinitic.cloudEvents.WorkflowExecutor.$workflowName
- io.infinitic.cloudEvents.ServiceExecutor.$serviceName
This enhancement provides greater visibility into the system's internal workings, making it easier to identify and resolve issues.
🚨 Breaking Changes
- Worker configuration: A new page in the documentation is available to explain how to set workers. Please refer to it for more details on the following changes:
- State Engines and Tag Engines settings must now be explicitly defined. Implicit settings are no longer supported.
- Config builder setters have been standardized to use
set+ variable name (e.g.,setMaxPoolSizeinstead ofmaxPoolSize). - Time-related settings now use consistent suffixes: "Seconds" replaces "InSeconds", "Minutes" replaces "InMinutes", etc.
- Static methods for Clients and Workers configuration now use "Yaml" prefix:
fromYamlResource,fromYamlString,fromYamlFile. - Storage:
- Explicit storage configuration is now required. Default values for local development have been removed to prevent confusion in production environments.
- 'user' parameter renamed to 'username' in MySQLConfig, PostgresConfig, and RedisConfig.
- Pulsar:
- Pulsar configuration moved under the
transportkeyword. - Pulsar client config now under
clientkeyword, with expanded settings. - Policies field names refactored for consistency.
delayedTTLInSecondsrenamed totimerTTLSecondsin Pulsar Policies configuration.
- Pulsar configuration moved under the
- Dashboard:
- All settings must now be under the
dashboardkeyword.
- All settings must now be under the
ExponentialBackoffRetryPolicyclass renamed toWithExponentialBackoffRetry.
- CloudEvents updates:
- Cloud-event listener are not anymore created under services and workflows
- Format changes for improved clarity and consistency.
- Sources now clearly differentiate between executor and stateEngine.
- Workflow version defaults to 0 when undefined (previously null).
- "start" command renamed to "dispatch".
- "ended" event renamed to "completed".
🔬 Improvements
- More reliable client deletion when topic is closing
- Improved implementation of consumers to ensure all messages are processed, even in case of errors or Shutdown
- Lib updates:
- Kotlin: 2.0.0 -> 2.0.10
- CloudEvents: 3.0.0 -> 4.0.1
- Jackson: 2.17.1 -> 2.17.2
- Uuid: 5.0.0 -> 5.1.0
- Kotest: 5.9.0 -> 5.9.1
- kotlinx-serialization-json: 1.6.3 -> 1.7.1
- TestContainers: 1.19.8 -> 1.20.1
- Mockk: 1.13.11 -> 1.13.12
- Pulsar: 3.0.4 -> 3.0.7
- Slf4j: 2.0.13 -> 2.0.16
- Logging: 6.0.9 -> 7.0.0
- Compress: 1.26.1 -> 1.27.1
🪲 Bug Fixes
- In workflows, if a property is present in the workflow history but disappeared from the workflow class, a warning is now emitted. Previously an error was thrown.
- When using dispatchAsync, multiple successive calls would use only the last arguments used
- Fix use of Schema for Postgres