feat: adding Kotlin support#5
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Kotlin/JVM implementation of PolyBus to extend the framework’s multi-language parity, including core bus APIs, message metadata, handler pipelines, and an in-memory transport, plus CI integration and documentation updates.
Changes:
- Introduces Kotlin core library (
IPolyBus,PolyBus,PolyBusBuilder), message/transaction models, and handler typealiases. - Adds Kotlin in-memory transport implementation and JSON (de)serialization handlers.
- Adds Kotlin test suite + Gradle build/coverage setup, and wires Kotlin into PR/release GitHub Actions and root documentation.
Reviewed changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/MessageWithoutAttribute.kt | Test helper message without annotation |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/MessagesTests.kt | Tests for message registry behavior |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/MessageInfoTests.kt | Tests for header parsing/equality semantics |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/serializers/JsonHandlerTestMessage.kt | Serializer test message model |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/serializers/JsonHandlersTests.kt | JSON handler unit test |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/error/TestTransport.kt | Test transport stub for error handler tests |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/error/TestBus.kt | Test bus stub for error handler tests |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/error/ErrorHandlerTests.kt | Error handler retry/dead-letter tests |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/handlers/error/ErrorHandlerTestMessage.kt | Error handler test message model |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/Event.kt | Test event message model |
| src/kotlin/src/test/kotlin/polybus/transport/transactions/messages/Command.kt | Test command message model |
| src/kotlin/src/test/kotlin/polybus/transport/inmemory/TestEnvironment.kt | In-memory transport test harness |
| src/kotlin/src/test/kotlin/polybus/transport/inmemory/TestEndpoint.kt | Endpoint fixture for in-memory tests |
| src/kotlin/src/test/kotlin/polybus/transport/inmemory/InMemoryTransportTests.kt | In-memory transport integration tests |
| src/kotlin/src/test/kotlin/polybus/transport/inmemory/AlphaEvent.kt | In-memory test event model |
| src/kotlin/src/test/kotlin/polybus/transport/inmemory/AlphaCommand.kt | In-memory test command model |
| src/kotlin/src/main/kotlin/polybus/transport/TransportFactory.kt | Kotlin transport factory typealias |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/Transaction.kt | Base transaction implementation |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/OutgoingTransactionFactory.kt | Outgoing transaction factory typealias |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/OutgoingTransaction.kt | Outgoing transaction type |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/PolyBusMessageNotFoundError.kt | Kotlin message registry error type |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/OutgoingMessage.kt | Outgoing message envelope |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/MessageType.kt | Command/Event enum |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/Messages.kt | Message registry for Kotlin |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/MessageInfo.kt | MessageInfo annotation + header parsing |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/Message.kt | Base message state/headers |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/IncomingMessage.kt | Incoming message envelope |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/handlers/serializers/JsonHandlers.kt | JSON serializer/deserializer handlers |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/handlers/OutgoingHandler.kt | Outgoing handler typealias |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/handlers/IncomingHandler.kt | Incoming handler typealias |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/messages/handlers/error/ErrorHandler.kt | Retry/dead-letter handler |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/IncomingTransactionFactory.kt | Incoming transaction factory typealias |
| src/kotlin/src/main/kotlin/polybus/transport/transactions/IncomingTransaction.kt | Incoming transaction type |
| src/kotlin/src/main/kotlin/polybus/transport/PolyBusNotStartedError.kt | Transport “not started” error |
| src/kotlin/src/main/kotlin/polybus/transport/ITransport.kt | Kotlin transport interface |
| src/kotlin/src/main/kotlin/polybus/transport/inmemory/InMemoryMessageBroker.kt | In-memory broker implementation |
| src/kotlin/src/main/kotlin/polybus/transport/inmemory/InMemoryEndpoint.kt | In-memory endpoint transport |
| src/kotlin/src/main/kotlin/polybus/PolyBusError.kt | Base error type for Kotlin |
| src/kotlin/src/main/kotlin/polybus/PolyBusBuilder.kt | Kotlin builder API + defaults |
| src/kotlin/src/main/kotlin/polybus/PolyBus.kt | Kotlin bus implementation + pipelines |
| src/kotlin/src/main/kotlin/polybus/IPolyBus.kt | Kotlin bus interface |
| src/kotlin/src/main/kotlin/polybus/Headers.kt | Common header keys |
| src/kotlin/settings.gradle.kts | Kotlin Gradle project naming |
| src/kotlin/README.md | Kotlin module documentation |
| src/kotlin/build.gradle.kts | Kotlin Gradle build + JaCoCo coverage task |
| README.md | Root README: add Kotlin support/docs |
| .gitignore | Ignore Gradle cache directories |
| .github/workflows/release-and-publish.yml | Add Kotlin build/test/artifact + publish job |
| .github/workflows/pr-tests.yml | Add Kotlin CI tests + coverage upload |
| .github/copilot-instructions.md | Document Kotlin module conventions |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.