Add ExternallyOwned() for Kafka topics to skip auto-provisioning and teardown#3062
Merged
jeremydmiller merged 1 commit intoJun 10, 2026
Merged
Conversation
…teardown Some topics on a Kafka cluster are owned by an external system where the calling identity only holds consume/produce ACLs, not CreateTopics or DeleteTopics. With AutoProvision() enabled, Wolverine would try to create every declared topic at startup (failing with Authorization failed) and delete them on resources teardown. Add an ExternallyOwned() option, exposed on the listener, subscriber, and topic-group listener configurations, that marks a topic's lifecycle as external. An IsExternallyOwned topic is skipped in SetupAsync, TeardownAsync, and InitializeAsync across KafkaTopic and KafkaTopicGroup, so it is never created at startup nor deleted at teardown. Cover the behavior in externally_owned_topics_are_skipped and document it with an "Externally-Owned Topics" section in the Kafka transport guide.
This was referenced Jun 10, 2026
jeremydmiller
added a commit
that referenced
this pull request
Jun 10, 2026
…lowup docs(kafka): polish ExternallyOwned() section (follow-up to #3062)
Ferchke7
pushed a commit
to Ferchke7/wolverine
that referenced
this pull request
Jun 10, 2026
Three small follow-ups to the docs added in JasperFx#3062: - Add the version Badge (6.7) on the section heading, matching the convention every other recent section in this file uses. - Cross-reference the "Topic Creation Options" section just above so Specification() / TopicCreation() / ExternallyOwned() are positioned as the same-spectrum APIs they are. - Document that 'dotnet run -- resources check' is NOT skipped for externally-owned topics — CheckAsync sends a Produce probe to verify each topic, which has an observable consequence users should know before running the command against a host with externally-owned endpoints. No API changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ferchke7
pushed a commit
to Ferchke7/wolverine
that referenced
this pull request
Jun 10, 2026
Wolverine could already mark a Kafka topic as ExternallyOwned() (JasperFxGH-3062) so that the topic is never declared at startup nor deleted on teardown. This adds the same escape hatch to the RabbitMQ transport for queues and exchanges that are owned by another system, where the connecting identity lacks the configure/delete permissions to create or remove the resource. When an endpoint is marked ExternallyOwned(): - it is never declared at startup, even with AutoProvision() on - it is never deleted during a resources teardown - its bindings are neither set up nor torn down Exposed as ExternallyOwned() on RabbitMqListenerConfiguration, RabbitMqSubscriberConfiguration, and RabbitMqExchangeConfiguration, and as an IsExternallyOwned setter on RabbitMqExchangeConfigurationExpression (alongside the existing DeclarePassive setter). Also fixes a teardown asymmetry surfaced by this work: a DeclarePassive exchange only verifies existence at startup (it never creates the exchange), so it is now left alone on teardown rather than being deleted. Adds externally_owned_rabbit_topology_is_skipped with broker-side existence checks covering queue/exchange setup-skip, owned-alongside-external, and the listener/exchange/DeclarePassive teardown paths. Documents the feature in the RabbitMQ object-management guide, including the DeclarePassive distinction. Closes JasperFx#3064 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some topics on a Kafka cluster may be owned by an external system where the calling identity only holds consume/produce ACLs, not CreateTopics or DeleteTopics. With AutoProvision() enabled, Wolverine would try to create every declared topic at startup (failing with Authorization failed) and delete them on resources teardown.
This change adds an ExternallyOwned() option, exposed on the listener, subscriber, and topic-group listener configurations, that marks a topic's lifecycle as external. An IsExternallyOwned topic is skipped in SetupAsync, TeardownAsync, and InitializeAsync across KafkaTopic and KafkaTopicGroup, so it is never created at startup nor deleted at teardown.
The behavior is covered in externally_owned_topics_are_skipped and documented with an "Externally-Owned Topics" section in the Kafka transport guide.