Problem/Motivation
Create a lean queue worker for DAM webhooks.
It should handle asset_created, dispatch Symfony events for all event types, and deduplicate replayed deliveries so duplicate deliveries are silently discarded.
As a developer, I want a lean queue worker that handles asset_created, dispatches Symfony events for all event types, and deduplicates replayed deliveries, so that third-party code can react to all webhook events and duplicate deliveries are silently discarded.
asset_deleted, asset_metadata_value_updated, and asset_version_added are now handled synchronously in WebhookReceiverController and will never be enqueued here.
This worker's primary responsibilities are asset_created (log + no-op by default) and Symfony event dispatching for all event types.
Acceptance criteria
- Extends
QueueWorkerBase, IDacquia_dam_webhook_events,cron = {"time" = 30} asset_created→ log + no-op (Symfony event below allows site code to react, e.g. auto-import)- No asset sync or unpublish logic — this is handled inline in
WebhookReceiverController - Delivery ID dedup via
keyvalue.expirablecollectionacquia_dam_webhooks.webhook_delivery_ids(24h TTL) - Symfony events dispatched for all event types:
AcquiaDamWebhookEvents::ASSET_VERSION_ADDED/ASSET_METADATA_VALUE_UPDATED/ASSET_DELETED/ASSET_CREATEDconstants AcquiaDamWebhookEventtyped accessors:getPayload()getAssetId()getEventType()getDeliveryId()getWebhookConfigurationId()getDateCreated()getEventContext()
- Subscriber exceptions caught + logged — never re-queue the item
- Only 3 injected services:
LoggerChannelInterface,EventDispatcherInterface,KeyValueExpirableFactoryInterface
Issue fork acquia_dam-3611281
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajeshreeputraRequesting review!
Comment #5
rajeshreeputraMR merged!