Elarion.Messaging.InMemory
0.2.1-preview.16.1
dotnet add package Elarion.Messaging.InMemory --version 0.2.1-preview.16.1
NuGet\Install-Package Elarion.Messaging.InMemory -Version 0.2.1-preview.16.1
<PackageReference Include="Elarion.Messaging.InMemory" Version="0.2.1-preview.16.1" />
<PackageVersion Include="Elarion.Messaging.InMemory" Version="0.2.1-preview.16.1" />
<PackageReference Include="Elarion.Messaging.InMemory" />
paket add Elarion.Messaging.InMemory --version 0.2.1-preview.16.1
#r "nuget: Elarion.Messaging.InMemory, 0.2.1-preview.16.1"
#:package Elarion.Messaging.InMemory@0.2.1-preview.16.1
#addin nuget:?package=Elarion.Messaging.InMemory&version=0.2.1-preview.16.1&prerelease
#tool nuget:?package=Elarion.Messaging.InMemory&version=0.2.1-preview.16.1&prerelease
<div align="center">
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-light.svg"> <img src="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-light.svg" width="640" alt="Elarion — Application framework for .NET"> </picture>
Module-based handler pipelines, compile-time registration, JSON-RPC hosting, MCP tools for AI agents, and scheduled jobs.
Declare intent next to your code; let source generators do the wiring. No runtime reflection scanning.
AI-native by design: the same handlers that power your API are exposed to AI agents as MCP tools — generated from your code at compile time, with no separate tool definitions or duplicated schemas.
</div>
Elarion's central idea is simple: your application assemblies define modules and handlers; your
host assembly only wires infrastructure, transport, and deployment. Everything that can be
discovered from your code — handlers, validators, services, scheduled jobs, RPC methods, EF Core
DbSets — is emitted by source generators at compile time instead of scanned by reflection at
startup.
[RpcMethod("clients.get")]
public sealed class GetClient(IAppDbContext db)
: IHandler<GetClient.Query, Result<GetClient.Response>> {
public sealed record Query(Guid Id);
public sealed record Response(Guid Id, string Name);
public async ValueTask<Result<Response>> HandleAsync(Query query, CancellationToken ct) {
var client = await db.Clients
.Where(c => c.Id == query.Id)
.Select(c => new Response(c.Id, c.Name))
.FirstOrDefaultAsync(ct);
return client is null
? AppError.NotFound($"Client {query.Id} was not found.")
: client;
}
}
That one class is a use case, a registered service, a JSON-RPC method, an MCP tool for AI agents,
and (optionally) a schema-exported TypeScript contract — with no entry added to any Program.cs
registration list.
Why Elarion
- Compile-time, not reflection — handlers, services, validators, modules, RPC maps, and scheduled jobs become ordinary DI code. Startup is deterministic and AOT-friendly; missing wiring is a build error, not a runtime surprise.
- Modules own their surface — a module is a namespace plus an
[AppModule]marker. Add a handler under it and the module publishes it automatically. - Transport-neutral results — handlers return
Result<T>with a transport-agnosticAppError; the host maps failures to JSON-RPC, HTTP, or anything else. - End-to-end JSON-RPC — mark a handler with
[RpcMethod], export a schema at build time, and generate a typed TypeScript + Zod client. - AI-native, no extra code — expose the same
[RpcMethod]handlers to AI agents as an MCP server, an independent transport with its own dispatcher. Tool names, descriptions, and input schemas are generated from your handlers and[Description]attributes at compile time — no separate tool layer, no duplicated schemas, no runtime reflection. Choose a handler's transports with[RpcMethod(Transports = …)](JSON-RPC, MCP, or both) and rename a tool with[McpMethod]. - In-process scheduling — source-generated scheduled jobs with explicit overlap, misfire, and resilience policies.
- Observable by default — JSON-RPC, scheduling, caching, and resilience emit
OpenTelemetry-compatible traces and metrics through
System.Diagnostics, with no SDK dependency forced on you.
Install
<ItemGroup>
<PackageReference Include="Elarion" Version="0.2.0" />
</ItemGroup>
// Turn the generators on, once per assembly
[assembly: UseElarion]
The Quickstart builds a module, a handler, and a working JSON-RPC endpoint end to end.
Packages
| Package | Purpose |
|---|---|
Elarion.Abstractions |
Attributes and contracts: [AppModule], [Service], [ScheduledJob], IHandler<,>, Result<T>, AppError. |
Elarion |
Runtime primitives: handler caches, decorators, the in-memory scheduler, resilience runtime, current-user access. Bundles the Elarion source generator (handlers, services, validators, modules, RPC/HTTP/MCP maps, resilience policies, scheduled jobs, event consumers). |
Elarion.Blobs |
Provider-neutral blob storage contracts and DTOs. |
Elarion.Blobs.PostgreSql |
PostgreSQL-backed blob storage with EF Core model configuration and Npgsql content I/O. |
Elarion.Messaging.InMemory |
In-memory integration-event bus (best-effort, commit-gated by the EF Core transaction). |
Elarion.Messaging.Outbox |
EF Core transactional outbox: a durable, at-least-once integration-event bus with a polling delivery worker. |
Elarion.Paging |
Keyset (cursor) and offset pagination primitives, opaque cursor codec, and IQueryable paging extensions. |
Elarion.JsonRpc |
Transport-neutral JSON-RPC dispatcher, envelopes, telemetry, and schema export. |
Elarion.AspNetCore |
ASP.NET Core JSON-RPC endpoint mapping, [HttpEndpoint] minimal-API mapping, batch execution, and current-user middleware. |
Elarion.AspNetCore.Mcp |
Exposes your JSON-RPC handlers as a Model Context Protocol (MCP) server for AI agents, over Streamable HTTP. |
Elarion.AspNetCore.SchemaGeneration |
MSBuild package that exports rpc-schema.json during dotnet build. |
Elarion.EntityFrameworkCore |
Marker attributes for generated DbSets and entity inclusion. Bundles the EF Core source generator (DbSet properties, entity configuration, keyset pagination). |
@swimmesberger/elarion-jsonrpc-client-generator |
TypeScript CLI that turns a schema export into method contracts, Zod schemas, and a fetch client. |
Documentation
Full guides live at elarion.wimmesberger.dev and in docs/:
- Introduction · Why Elarion · Installation · Quickstart
- Concepts — source generation, handlers, results & errors, modules, services, validators, pipelines, cross-module communication
- Capabilities — hosting, HTTP endpoints, JSON-RPC, MCP server, scheduling, resilience, events & messaging, EF Core, caching, current user, blob storage, telemetry
- Reference — packages, configuration, troubleshooting
Requirements
- .NET 10 SDK or later
- ASP.NET Core for the JSON-RPC HTTP transport
- Node.js 18+ for the TypeScript client generator
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for the development workflow, validation commands, architecture boundaries, and the publishing process. By participating you agree to the Code of Conduct.
Security
Please report vulnerabilities privately — see the security policy.
License
Elarion is licensed under the Apache License 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Elarion (>= 0.2.1-preview.16.1)
- Elarion.Abstractions (>= 0.2.1-preview.16.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.1-preview.16.1 | 0 | 6/24/2026 |
| 0.2.1-preview.15.1 | 0 | 6/24/2026 |
| 0.2.1-preview.14.1 | 0 | 6/24/2026 |
| 0.2.1-preview.13.1 | 0 | 6/24/2026 |
| 0.2.1-preview.12.1 | 0 | 6/24/2026 |
| 0.1.2-preview.11.1 | 0 | 6/24/2026 |
| 0.1.1-preview.10.1 | 22 | 6/24/2026 |
| 0.1.0-preview.42.1 | 37 | 6/23/2026 |
| 0.1.0-preview.41.1 | 38 | 6/23/2026 |
| 0.1.0-preview.40.1 | 48 | 6/23/2026 |
| 0.1.0-preview.38.1 | 54 | 6/21/2026 |
| 0.1.0-preview.37.1 | 49 | 6/21/2026 |
| 0.1.0-preview.5.1 | 36 | 6/23/2026 |
| 0.1.0-preview.4.1 | 33 | 6/23/2026 |
| 0.1.0-preview.3.1 | 49 | 6/23/2026 |