Skip to content

Retagging#436

Merged
m1l4n54v1c merged 3 commits intomasterfrom
feature/retagging
Aug 4, 2025
Merged

Retagging#436
m1l4n54v1c merged 3 commits intomasterfrom
feature/retagging

Conversation

@m1l4n54v1c
Copy link
Copy Markdown
Contributor

This PR supports the Retagging feature in Axon Server. Since the feature is still unavailable in the Axon Server, it is in draft mode.

@m1l4n54v1c m1l4n54v1c requested review from MGathier, abuijze and smcvb July 15, 2025 08:27
@m1l4n54v1c m1l4n54v1c self-assigned this Jul 15, 2025
Copy link
Copy Markdown
Contributor

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

Minor request to add a replace operation.

* @param tags the tags to remove from the event
* @return a CompletableFuture containing the response
*/
CompletableFuture<RemoveTagsResponse> removeTags(long sequence, Collection<Tag> tags);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Can we add a replace on this interface, that defaults to first invoke remove and then add? It would keep the Axon Server API simple, but provide an easy step for consumers of the Axon Server Connector.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an interesting suggestion! However, if we don't support replace in the Axon Server, it wouldn't make sense to support it in the connector. The main reason is that we cannot make the operation atomic in the connector. Hence, it's better to leave error handling to the end client rather than have the connector try to do it automatically.

I don't know when we'll support replace in the Axon Server.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, so a replace is scheduled, that's curious.

I figured that from the connector's perspective, it doesn't have to be atomic. The documentation can clearly state it's a two-step operation, using the existing addTags and removeTags.
Furthermore, exception handling...wouldn't that just be "removing fails, so we skip adding..?"
If I am reasoning about this to simplistically, just let me know!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not scheduled, but there are some thoughts about it. Especially if it's even necessary, or even if that's something worthwhile.

Your reasoning is sound! Personally, I'd prefer not to add it, because (without reading the docs) it is expected to be atomic. I'd add it only when AS supports it to avoid any confusion - it'd create more questions than usefulness.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fair points, @m1l4n54v1c! Let's drop this idea then.
The request mainly comes from anticipating how users will want to integrate with this.
Assuming that Axon Framework will have some integration, I'd expect people would want a replace functionality; hence why I was looking for it.
However, that's all in the future, no necessity for now whatsoever.

Copy link
Copy Markdown
Contributor

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

My concerns have been addressed, hence I'm approving this pull request.

@m1l4n54v1c m1l4n54v1c marked this pull request as ready for review August 4, 2025 11:59
@m1l4n54v1c m1l4n54v1c requested a review from trimoq as a code owner August 4, 2025 11:59
@m1l4n54v1c m1l4n54v1c merged commit 8aca074 into master Aug 4, 2025
1 of 4 checks passed
@m1l4n54v1c m1l4n54v1c deleted the feature/retagging branch August 4, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants