{"id":20905182,"url":"https://github.com/akkadotnet/akka.serialization.messagepack","last_synced_at":"2026-01-27T05:17:08.869Z","repository":{"id":76998722,"uuid":"85062412","full_name":"akkadotnet/Akka.Serialization.MessagePack","owner":"akkadotnet","description":"Akka.NET serialization with MessagePack","archived":false,"fork":false,"pushed_at":"2025-03-17T11:53:44.000Z","size":150,"stargazers_count":14,"open_issues_count":12,"forks_count":9,"subscribers_count":7,"default_branch":"dev","last_synced_at":"2025-05-11T19:42:24.096Z","etag":null,"topics":["akka","akkadotnet","messagepack","msgpack","serialization"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akkadotnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-15T11:02:35.000Z","updated_at":"2024-12-24T13:45:05.000Z","dependencies_parsed_at":"2024-02-16T15:28:16.372Z","dependency_job_id":"c3ece0f2-b63e-4e4c-a597-0999b32b336f","html_url":"https://github.com/akkadotnet/Akka.Serialization.MessagePack","commit_stats":null,"previous_names":["alexvaluyskiy/akka.serialization.messagepack"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akkadotnet%2FAkka.Serialization.MessagePack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akkadotnet%2FAkka.Serialization.MessagePack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akkadotnet%2FAkka.Serialization.MessagePack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akkadotnet%2FAkka.Serialization.MessagePack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akkadotnet","download_url":"https://codeload.github.com/akkadotnet/Akka.Serialization.MessagePack/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253882840,"owners_count":21978554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akka","akkadotnet","messagepack","msgpack","serialization"],"created_at":"2024-11-18T13:22:56.700Z","updated_at":"2026-01-27T05:17:08.841Z","avatar_url":"https://github.com/akkadotnet.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Akka.Serialization.MessagePack\n===\n[![Build status](https://ci.appveyor.com/api/projects/status/xaltap7v4n0m042d/branch/dev?svg=true)](https://ci.appveyor.com/project/akkadotnet-contrib/akka-serialization-messagepack/branch/dev) [![NuGet Version](http://img.shields.io/nuget/v/Akka.Serialization.MessagePack.svg?style=flat)](https://www.nuget.org/packages/Akka.Serialization.MessagePack/)\n\nAkka.NET serialization with [MessagePack](https://github.com/neuecc/MessagePack-CSharp)\n\nThe `Akka.Serialization.MessagePack` plugin is designed to:\n\n - Be Low Ceremony for common cases.\n - Allow flexiblity for advanced cases.\n - Provide High Performance\n - Allow for Optional LZ4 compaction.\n\n### Payload Versioning Notes\n\n#### Assembly Versions\nThis plugin has a few different options to control payload serialization/deserialization:\n\n - `allow-assembly-version-mismatch`\n   - If `False`, Assembly version mismatches between payload and availiable deserializer will throw.\n   - Default is `True`\n - `omit-assembly-version`\n   - Controls whether Assembly version is included in payload.\n\n\n#### Schema Evolution\n\nOne *can* do a form of 'Schema evolution' (if you squint at it from the right angle) with MessagePack payload definitions.\n\nConsider the following:\n\n```csharp\n[MessagePackObject(false)]\npublic class WireType\n{\n   [Key(0)]\n   public int Foo {get;set;}\n   [Key(1)]\n   public string Bar {get;set;}\n   [Key(2)]\n   public byte[] Bin {get;set;}\n}\n```\n\nThe above uses Messagepack attributes to define that every item is packed into an array.\n\nIf one wanted to add a new field, they could do, for example,\n\n```csharp\n[MessagePackObject(false)]\npublic class WireType\n{\n   [Key(0)]\n   public int Foo {get;set;}\n   [Key(1)]\n   public string Bar {get;set;}\n   [Key(2)]\n   public byte[] Bin {get;set;}\n   [Key(3)]\n   public byte[]? OtherBin {get;set;}\n}\n```\n\nThe consumer will, of course, need to do it's own checks for whether `OtherBin` is null, however the serializer itself will be able to handle using/ignoring data appropriately.\n\nTwo additional notes:\n\n1. Any empty slots will be filled with nil up to the max Key in the array. So, in the above example, if `OtherBin` had a Key index of 64, it would be serialized as a 64 slot array with 60 `nil` values between `Bin` and `OtherBin`.\n2. One can apply inheritance and DU-style behavior via attributes, see the MP docs for details.\n\n## How to setup MessagePack as default serializer\nBind MessagePack serializer using following HOCON configuration in your actor system settings:\n```hocon\nakka {\n  actor {\n    serializers {\n      messagepack = \"Akka.Serialization.MessagePack.MsgPackSerializer, Akka.Serialization.MessagePack\"\n    }\n    serialization-bindings {\n      \"System.Object\" = messagepack\n    }\n  }\n}\n```\n\n## Benchmarks\n``` ini\n\nBenchmarkDotNet=v0.10.9, OS=Windows 10 Redstone 2 (10.0.15063)\nProcessor=Intel Core i5-6400 CPU 2.70GHz (Skylake), ProcessorCount=4\nFrequency=2648439 Hz, Resolution=377.5809 ns, Timer=TSC\n.NET Core SDK=2.0.0\n  [Host]      : .NET Core 2.0.0 (Framework 4.6.00001.0), 64bit RyuJIT\n  NETCORE 2.0 : .NET Core 2.0.0 (Framework 4.6.00001.0), 64bit RyuJIT\n\nJob=NETCORE 2.0  Platform=X64  Runtime=Core  \nServer=True  Toolchain=CoreCsProj  \n\n```\n |                                                 Method |        Mean |      Error |     StdDev |  Gen 0 | Allocated |\n |------------------------------------------------------- |------------:|-----------:|-----------:|-------:|----------:|\n |                               MsgPack_serialize_string |    248.7 ns |   2.221 ns |   2.078 ns | 0.0029 |     112 B |\n |                              Hyperion_serialize_string |    414.2 ns |   5.646 ns |   5.281 ns | 0.0257 |     832 B |\n |                               JsonNet_serialize_string |  1,854.9 ns |  36.749 ns |  43.748 ns | 0.1355 |    4336 B |\n |                         MsgPack_serialize_SimpleObject |    351.6 ns |   5.425 ns |   5.074 ns | 0.0037 |     136 B |\n |                        Hyperion_serialize_SimpleObject |    965.3 ns |  12.820 ns |  11.992 ns | 0.0331 |    1112 B |\n |                         JsonNet_serialize_SimpleObject | 23,832.4 ns | 339.575 ns | 317.639 ns | 0.4008 |   14576 B |\n |       MsgPack_serialize_SimpleOptimizedObject_int_keys |    200.1 ns |   1.425 ns |   1.333 ns | 0.0019 |      72 B |\n | Hyperion_serialize_SimpleOptimizedObject_preregistered |    493.4 ns |   6.110 ns |   5.715 ns | 0.0216 |     712 B |\n |                       MsgPack_serialize_TypelessObject |  2,096.3 ns |  21.150 ns |  19.784 ns | 0.0120 |     568 B |\n |                      Hyperion_serialize_TypelessObject |  5,698.9 ns |  34.648 ns |  32.410 ns | 0.1465 |    4952 B |\n |                       JsonNet_serialize_TypelessObject | 42,583.6 ns | 291.306 ns | 258.235 ns | 0.3342 |   13960 B |\n\n\n## Maintainer\n- [alexvaluyskiy](https://github.com/alexvaluyskiy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakkadotnet%2Fakka.serialization.messagepack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakkadotnet%2Fakka.serialization.messagepack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakkadotnet%2Fakka.serialization.messagepack/lists"}