Releases: caplin/DataSource-Extensions
1.3.0
This release introduces support for publishing DataSource Containers directly from Spring @MessageMapping endpoints.
Endpoints can now return Flow<ContainerEvent<T>> (Kotlin) or Flux<ContainerEvent<T>> (Java). The starter automatically detects the ContainerEvent type and configures the underlying DataSource with active containers and records. As with other subject types, the container and record subjects are automatically registered with the Caplin Platform via Dynamic Configuration.
Usage Example
@MessageMapping("/public/container/{id}")
fun myContainer(@DestinationVariable id: String): Flow<ContainerEvent<MyPayload>> = flow {
// Emit initial rows
emit(ContainerEvent.Bulk(
ContainerEvent.RowEvent.Upsert("row-1", MyPayload("Data 1")),
ContainerEvent.RowEvent.Upsert("row-2", MyPayload("Data 2"))
))
// Emit subsequent updates
while (true) {
delay(1.seconds)
emit(ContainerEvent.RowEvent.Upsert("row-1", MyPayload("Updated Data")))
}
}1.2.0
Allow the ObjectMapper to be provided to SimpleDataSourceFactory.createDataSource to allow customisation of the serialized JSON and additional Jackson modules to be installed.
1.1.1
The regex for namespaces automatically bound to Services has been corrected to use the posix regex.
1.1.0
Add a context value onto Bind so that extension functions that take Bind as a receiver parameter may access the underlying DataSource.
Initial Release
1.0.0 Description may be nullable, so provide a default