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

Nats registry action #120

Merged
merged 1 commit into from
Jul 23, 2023
Merged

Conversation

kobergj
Copy link
Contributor

@kobergj kobergj commented Jul 20, 2023

We are using nats as service registry. When a service is restarting it wouldn't update the registry entry. Looking into it, this was because the nats registry only does a "create" action when storing to nats. That means that existing entries are not overwritten.

Since it looked like it was a deliberate decision to use "create", this adds a configuration option RegisterAction for it. It can be used with "put" to update or create a new registry entry. It could also be used with "update" if one doesn't want to create new registry entries if they do not exist.

The default is still "create" so there are no breaking changes.

Copy link
Contributor

@jochumdev jochumdev left a comment

Choose a reason for hiding this comment

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

Nice, thanks for finding and implementing the Option.

@jochumdev jochumdev merged commit 1ada012 into micro:main Jul 23, 2023
2 of 3 checks passed
@kobergj kobergj deleted the AllowConfiguringRegisterAction branch July 25, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants