Skip to content

Releases: caplin/DataSource-Extensions

1.3.0

06 Feb 11:19
78bcf6b

Choose a tag to compare

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

19 Nov 11:54
3c496d2

Choose a tag to compare

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

17 Nov 16:39
813696c

Choose a tag to compare

The regex for namespaces automatically bound to Services has been corrected to use the posix regex.

1.1.0

18 Jul 13:06

Choose a tag to compare

Add a context value onto Bind so that extension functions that take Bind as a receiver parameter may access the underlying DataSource.

Initial Release

12 Jun 19:53

Choose a tag to compare

1.0.0

Description may be nullable, so provide a default