feat(queue): add cloud-agnostic queue publisher abstraction#35628
Merged
Conversation
Introduce a DotQueuePublisher interface with a config-driven locator (DOT_QUEUE_PROVIDER) and two implementations: SqsQueuePublisher using the default AWS credentials chain (IAM roles), and a NoOpQueuePublisher for when no provider is configured. Designed to be extended with additional cloud providers (GCP Pub/Sub, Azure Service Bus) as needed.
…er warning - SqsQueuePublisher.publish() validates queueName and messageBody - NoOpQueuePublisher constructor is now private (singleton via INSTANCE) - DotQueuePublisherLocator warns on unrecognized provider values
Locator now accepts a fully-qualified class name in DOT_QUEUE_PROVIDER for custom/plugin providers, matching the DotPubSubProviderLocator extensibility pattern. isAvailable(queueName) validates that the logical queue name resolves to a configured destination.
… lookup Locator now throws DotQueueException instead of falling back to no-op when an explicit custom provider class cannot be loaded — prevents silent message loss from config typos. Queue name uppercasing uses Locale.ROOT to avoid Turkish-I and similar locale-dependent bugs.
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
|
Claude finished @swicken's task in 1m 16s —— View job Rollback Safety Analysis
Verdict: ✅ Safe to roll back The PR is purely additive infrastructure:
Category check:
Per the PR description, no consumers are wired up — analytics event delivery comes in a follow-up. N-1 simply doesn't have these classes and doesn't query for them; rollback is a no-op. Label applied: |
Swap from com.amazonaws (SDK v1, EOL Dec 2025) to software.amazon.awssdk (SDK v2) for the SQS publisher. Add v2 BOM to dependency management. Also: isAvailable() is now a cheap config check (no client construction), validation uses null/isEmpty instead of UtilMethods.isSet to avoid rejecting legitimate payloads, and test uses an explicit sentinel queue name.
…e filtering Add interface javadoc for intended publish-vs-isAvailable pattern, document that empty attribute values are filtered, note that DOT_QUEUE_PROVIDER is a trusted-operator setting (arbitrary class loading), and document Lazy failure-retry behavior.
… coverage Extract resolve(String) from the Lazy lambda so provider selection logic is directly testable without static state. Trim and default empty/whitespace DOT_QUEUE_PROVIDER values. Soften isAvailable contract to "configuration check, not connectivity check." Add tests for reflection branches (bad class, wrong interface), null/empty/ whitespace provider handling, and case-insensitive matching.
jcastro-dotcms
approved these changes
May 8, 2026
dario-daza
approved these changes
May 8, 2026
dsolistorres
approved these changes
May 8, 2026
freddyDOTCMS
reviewed
May 9, 2026
freddyDOTCMS
approved these changes
May 12, 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.
Summary
Closes #35630
DotQueuePublisherinterface with config-driven provider selection viaDotQueuePublisherLocator(DOT_QUEUE_PROVIDER)SqsQueuePublisher(AWS SQS via IAM/default credentials chain) andNoOpQueuePublisher(default, discards messages)DotPubSubProviderLocatorextensibility patternDOT_QUEUE_SQS_URL_<QUEUE_NAME>)This is a standalone infrastructure abstraction with no consumers wired up yet. Analytics event delivery will be connected in a follow-up PR.
Configuration
DOT_QUEUE_PROVIDERsqs,noop, or a fully-qualified class namenoopDOT_QUEUE_SQS_REGIONus-east-1DOT_QUEUE_SQS_ENDPOINTDOT_QUEUE_SQS_URL_<NAME>Test plan
NoOpQueuePublisheris default when no provider configuredDotQueueException(no silent fallback)DOT_QUEUE_PROVIDER=sqs