Restate SDK for JVM Languages
Repo restatedev/sdk-java, read from GitHub 2 d ago. restatedev has not joined Take My Repo.
Fixed a bug where, if the same named signal was delivered twice, in some situations it could lead to losing one of them.
Every delivery is now kept and handed out in order, one per ctx.signal(name) call.
Full Changelog: v2.10.0...v2.11.0
PayloadCodecThe new PayloadCodec interface lets you transform journal payloads after serialization and before deserialization. The typical use case is service-side journal encryption: Restate only ever stores and sees the encoded bytes.
The codec is applied to handler input and output, ctx.run results, call/send parameters and call results, awakeable/promise/signal results, and state values.
Failures (e.g. terminal error messages), state keys, headers and other metadata are not encoded.
Implement encode(Slice) / decode(Slice), then configure the codec on the endpoint. Requests and responses are encoded too, so configure the ingress Client with the same codec:
PayloadCodec codec = new MyPayloadCodec(); // Applied to all the services bound to this endpoint RestateHttpServer.listen(Endpoint.bind(new Greeter()).withPayloadCodec(codec)); // Ingress client Client client = Client.connect("http://localhost:8080", null, codec, null);
With Spring Boot, just declare a PayloadCodec bean in any of your @Configuration classes: it is picked up both by the Restate endpoint and by the auto-configured Client.
@Configuration public class RestateConfiguration { @Bean public PayloadCodec payloadCodec() { return new MyPayloadCodec(); } }
Check out the AWS KMS example for a complete codec implementation using AES-GCM-256 and AWS KMS.
NOTE:
PayloadCodecrequires the new state machine, available on JDK 23+
DurableFuture fixesDurableFuture (both Java and Kotlin) was reimplemented, fixing several issues with mappers and combinators. There's few behavior improvements to be aware of:
map, mapFailure) now run lazily on the thread/coroutine awaiting the future, rather than eagerly on another thread (Java) or a launched coroutine (Kotlin). Context operations inside a mapper (e.g. ctx.set, awaiting other futures) are now correctly ordered and deterministic on replay.DurableFuture.any/select.DurableFuture is now a sealed interface instead of an abstract class.The new dev.restate:integration-client module lets you turn any source of events into Restate invocations through the Integration API, including exactly-once ingestion for sources with stable offsets. This API is in Preview and it might change in subsequent releases.
Check out the documentation to get started.
Full Changelog: v2.9.4...v2.10.0
In case you missed them, check the 2.9 release notes
Full Changelog: v2.9.3...v2.9.4
In case you missed them, check the 2.9 release notes
Due to several CVEs, we updated netty ≥ 4.1.132.
Spring Boot's dependency management may pin an older netty and silently downgrade it, causing runtime issues:
<netty.version>4.1.136.Final</netty.version> in pom.xmlio.spring.dependency-management plugin): netty.version=4.1.136.Final in gradle.propertiesFull Changelog: v2.9.2...v2.9.3
In case you missed them, check the 2.9 release notes
Due to several CVEs, we updated netty ≥ 4.1.132.
Spring Boot's dependency management may pin an older netty and silently downgrade it, causing runtime issues:
<netty.version>4.1.136.Final</netty.version> in pom.xmlio.spring.dependency-management plugin): netty.version=4.1.136.Final in gradle.propertiesFull Changelog: v2.9.1...v2.9.2
In case you missed them, check the 2.9 release notes
Full Changelog: v2.9.0...v2.9.1