Class AkkaSerializableAttribute
Marks a type that should be handled by a generated serializer.
Inherited Members
Namespace: Akka.Serialization.V2
Assembly: Akka.Serialization.V2.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class AkkaSerializableAttribute : Attribute
Properties
| Edit this page View SourceAllowEmpty
Opts a deliberately fieldless message into codegen. By default, an AkkaSerializableAttribute type with no AkkaFieldAttribute properties is rejected (AKKASG004): almost always a mistake (a forgotten AkkaFieldAttribute), but some protocol messages are legitimately fieldless -- for example, a heartbeat whose arrival IS the signal, with no payload to carry. Set this to true to generate an empty-map write and a skip-loop read (tolerating unknown fields for forward compatibility) instead of failing compilation.
Declaration
public bool AllowEmpty { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
Manifest
Stable serializer-owned manifest for top-level protocol messages.
Declaration
public string? Manifest { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Edit this page