Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ClusterClient messages be serialized using ClusterClientMessageSerializer #7032

Merged

Conversation

Arkatufus
Copy link
Contributor

Fixes #6803

Changes

  • Add ClusterClient specific message types to the ClusterClientMessageSerializer serializer
  • Add new type mapping for ClusterClient specific message types to the serializer HOCON settings
  • Add a backward compatibility flag to turn this new feature on and off (defaults to old behaviour)
  • Add spec to make sure that new behavior is behaving correctly.

@Arkatufus Arkatufus marked this pull request as ready for review January 3, 2024 17:40
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks fine, but left one suggestion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (o is ClusterReceptionist.ReceptionistShutdown) return ReceptionistShutdownManifest;

throw new ArgumentException($"Can't serialize object of type [{o.GetType()}] in [{nameof(ClusterClientMessageSerializer)}]");
return o switch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


# Turning this setting to off or false will cause the ClusterClient messages
# to be serialized using the ClusterClientMessageSerializer and not the default Object serializer.
use-legacy-serialization = on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) January 3, 2024 20:23
@Aaronontheweb Aaronontheweb disabled auto-merge January 3, 2024 21:11
@Aaronontheweb Aaronontheweb merged commit 1e24aab into akkadotnet:dev Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants