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, ID acquia_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.expirable collection acquia_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_CREATED constants
  • AcquiaDamWebhookEvent typed 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

Command icon 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

rajeshreeputra created an issue. See original summary.

rajeshreeputra’s picture

Title: Create queue worker and Symfony events to subscribe and despatch webhook events » Create queue worker to create media for asset_created webhook.
Assigned: rajeshreeputra » Unassigned
Status: Active » Needs review

Requesting review!

  • rajeshreeputra committed 584405ea on 1.1.x-webhook
    Resolve #3611281 "Create queue worker to create media for asset_created...
rajeshreeputra’s picture

Status: Needs review » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • rajeshreeputra committed 1b271a6f on 1.1.x-webhook
    Resolve #3611281 "Create queue worker to create media for asset_created...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.