akka-samples-peristence-java by Lightbend, but using Kotlin.

Overview

This example illustrates event sourcing with Akka Persistence.

it is based (okay, stolen from) the generated sample project akka-samples-peristence-java but with some Kotlin grammar and idiom applied. This project is open for improvement, so if you find some code that could be more Kotlin-like or better in any way, then don't hesitate to prepare a PR.

Study the source code of ShoppingCart.kt. A few things to note:

  • The actor is implemented with the EventSourcedBehavior
  • It defines Command, Event and State
  • Commands define replyTo: ActorRef to send a confirmation when the event has been successfully persisted
  • State is only updated in the event handler
  • onPersistFailure defines restarts with backoff in case of failures

Tests are defined in ShoppingCartTests.kt. To run the tests, enter:

gradle test

The ShoppingCart application is expanded further in the akka-sample-cqrs-java sample. In that sample the events are tagged to be consumed by event processors to build other representations from the events, or publish the events to other services.

You might also like...
Social media app but with new features like translate messages and posts , support video & images as posts  , chat and  notifications , etc...
Social media app but with new features like translate messages and posts , support video & images as posts , chat and notifications , etc...

social-media-app Social media app but with new features like translate messages and posts , support video & images as posts , chat and notifications ,

ArchGuard Scanner for scan Git change history, scan source code by Chapi for Java, TypeScript, Kotlin, Go..、Java bytecode use for JVM languages, scan Jacoco test coverage.

Arch Scanner Requirements: JDK 12 Scanner: scan_git - Git commit history scan scan_jacoco - Jacoco scan scan_bytecode - for JVM languages known issues

A modular and portable open source XMPP client library written in Java for Android and Java (SE) VMs

Smack About Smack is an open-source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. Being a

A modular and portable open source XMPP client library written in Java for Android and Java (SE) VMs

Smack About Smack is an open-source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. Being a

Clone of Snapchat app made using android studio and java.
Clone of Snapchat app made using android studio and java.

Snapchat-Clone Clone of Snapchat app made using android studio and java. Screenshots of the app : License MIT License Copyright (c) 2021 Nisa Efendi

The Android application is a list of the most popular TV series written in Java using the mvvm pattern.
The Android application is a list of the most popular TV series written in Java using the mvvm pattern.

Tv show application The Android application is a list of the most popular TV series written in Java using the mvvm pattern. This project was written f

A news app made using android studio in Java with features like favourite news, Location detector for local news, and especially made with HUAWEI APIs

HuaweiGlobalNewsApp A news app made using android studio in Java with features like favourite news, Location detector for local news, and especially m

Android Application Using Java
Android Application Using Java

RandomUserApp [CLASS PROJECT] Android Application Using Java Aplicação android em linguagem Java desenvolvida para a disciplina de Ferramentas Computa

Mobile translation application built using android studio and java.
Mobile translation application built using android studio and java.

Translate I'm here when you need translation 👀 🔨 Libraries used in the project : implementation 'com.google.mlkit:translate:16.1.2' implementation '

Owner
Jurjen Vorhauer
Jurjen Vorhauer
Samples demonstrating the features and use of Koala Plot, a Compose Multiplatform based charting and plotting library written in Kotlin.

Koala Plot Samples This repository houses samples demonstrating the use and features of Koala Plot libraries. How to run Build koalaplot-core with the

Koala Plot 6 Oct 18, 2022
A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tumblr application , But a little prettier than him 😉

A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tum

Ahmed Ihab 17 Dec 23, 2022
Google Play game services - Android samples

Google Play game services - Android Samples Copyright (C) 2014 Google Inc. Contents These are the Android samples for Google Play game services. Colle

Google Play Game Services 953 Jan 2, 2023
Android samples for Google Workspace APIs

Google Workspace Android Samples A collection of samples that demonstrate how to call Google Workspace APIs from Android. Products Drive Deprecation A

Google Workspace 615 Dec 16, 2022
Samples in Material Animation (Deprecated)

Material-Animation-Samples (Deprecated) or watch it on youtube #Samples: Samples in material animation will be added through the next two monthes. Lay

Ahmed Tarek 228 Dec 7, 2021
Samples showing best practices for MIDI on Android.

MIDI Samples This repository contains a set of individual Android Studio projects to help you write apps using MIDI APIs. Android MIDI 2.0 API samples

Android 23 Dec 19, 2022
A work-in-progress quiz app I started developing for a client but got paused.

quiz-app A work-in-progress quiz app I started developing for a client but got paused. Background This app was intended to be a trivia app where users

Ahmet Safa Orhan 7 Oct 18, 2022
Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!

Wisnu Kurniawan 134 Dec 31, 2022
A minimalist but powerful productivity timer designed to keep you focused and free of distractions.

Goodtime A minimalist but powerful productivity timer designed to keep you focused and free of distractions. Alternate between focused work sessions a

Adrian Cotfas 692 Dec 27, 2022
Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting.

gruvbox-plain Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting. Syntax Colors gr

null 2 Dec 28, 2022