Event Types and Lifecycle

Learn the event types and lifecycle that drive Federation synchronization in Artifactory.

Federation synchronization is driven by events. Every operation on a Federated repository, including deploying an artifact, updating properties, deleting a file, or modifying repository configuration, generates an event that propagates to other Federation members.

Artifact Event Types

When an artifact operation occurs on a Federated repository, an event of one of the following types is generated.

Event TypeTriggerWhat Propagates
CREATEA new artifact is deployed to the repository.Artifact metadata (path, checksums, size, uploadedBy, timestamps) and a binary task to transfer the file content.
UPDATEAn existing artifact is overwritten with a new version.Updated metadata and a binary task for the new file content.
DELETEAn artifact is deleted from the repository (including trash can emptying).Deletion instruction. The artifact is removed from all members.
PROPSProperties are added, modified, or removed on an artifact or folder.Property key-value pairs.

Repository Event Types

Repository-level operations generate a separate class of events.

Event TypeTriggerWhat Propagates
REPO_CREATEA new Federated repository is created and members are configured.Repository configuration and member list.
REPO_UPDATERepository settings are modified (description, include and exclude patterns, layout, and others).Updated repository configuration.
REPO_DELETEA Federated repository is deleted.Deletion instruction to remote members.
REPO_SYNCA configuration sync is triggered (push configuration or scheduled sync).Current repository configuration to align all members.
REPO_STATUS_CHANGEA member is enabled, disabled, or its status changes.Updated member status.

Event Lifecycle

flowchart LR
    subgraph source ["Source Member"]
        op["Artifact operation"] --> ev["Event generated"]
        ev --> queue["Event queue (persistent)"]
    end

    subgraph rtfs ["RTFS"]
        worker["Worker picks up event batch"]
        worker --> dedup["Deduplication"]
        dedup --> propagate["Propagate to target members"]
    end

    subgraph target ["Target Member"]
        receive["Receive event"]
        receive --> apply["Apply metadata"]
        apply --> binary{"Binary needed?"}
        binary -->|Yes| task["Create binary task"]
        binary -->|No| done["Complete"]
        task --> transfer["Transfer binary"]
        transfer --> done
    end

    queue --> worker
    propagate --> receive

    classDef component fill:#41b375,stroke:#389b65,stroke-width:1px,color:#fff;
    classDef secondary fill:#ffffff,stroke:#41b375,stroke-width:1.5px,color:#41b375;
    class op,ev,queue,worker,dedup,propagate,receive,apply,task,transfer component;
    class binary,done secondary;

    style source fill:none,stroke:#41b375,stroke-width:1px;
    style rtfs fill:none,stroke:#41b375,stroke-width:1px;
    style target fill:none,stroke:#41b375,stroke-width:1px;

    linkStyle default stroke:#8e9aaf,stroke-width:1.5px;

Step-by-Step Flow

  1. Event generation: An artifact or repository operation on a member generates an event with the operation type, artifact path, metadata, and checksums.
  2. Persistent queueing: The event is written to a persistent database-backed queue, ensuring durability across restarts.
  3. Worker processing: RTFS workers poll the queue in configurable batches (rtfs.worker.batch.size, default: 100 events). HIGH and URGENT priority repositories use larger batches (up to 400 events).
  4. Deduplication: Before propagation, the system deduplicates events. For example, if the same artifact is created and then deleted before the CREATE event was propagated, the deduplication logic can eliminate both events (controlled by federated.skip.create.eliminate.delete.on.deduplication).
  5. Propagation: Events are sent to each target member based on mirror mode. Bidirectional members send and receive. Receiving-only members only receive. Transmitter members only send.
  6. Binary task creation: If a CREATE or UPDATE event references a binary that doesn't exist on the target member, a binary task is created to transfer the file content.
  7. Completion: The event is marked as processed. Failed events are retried up to the configured limit (federated.event.queue.max.error.retries, default: 6).

Event Retention and Cleanup

Processed events are retained for a configurable period and then cleaned up. If a prolonged outage delays propagation past the retention window, the cleanup job can purge unpropagated events, forcing an affected member into an out-of-sync state that requires a Full Sync to recover.

PropertyDefaultDescription
rtfs.events.cleanup.cron0 0 1 * * ?Schedule for the event cleanup job (daily at 1:00 AM).
rtfs.events.cleanup.retention.time.Days3Number of days to retain processed events before deletion.
artifactory.events.log.cleanup.age.of.entries.to.discard.days3Legacy service: days before events are purged from the queue.
🚧

Warning

If events accumulate over several days without being propagated (for example, due to a prolonged outage), the cleanup job may purge events before they reach the target member. This causes the queue to transition to an ERROR_OUT_OF_SYNC state, requiring a Full Sync to recover.

Event Deduplication

The deduplication system reduces redundant event propagation.

PropertyDefaultDescription
federated.skip.create.eliminate.delete.on.deduplicationfalseWhen enabled, skips the create-then-delete elimination optimization during deduplication.
rtfs.skip.delete.events.dedupfalseWhen enabled, skips deduplication of delete events.

Grace Period

To avoid race conditions between nearly simultaneous events, a grace period controls the minimum interval between processing subsequent events for the same artifact.

PropertyDefaultDescription
federated.subsequent.event.grace.period60000 (60 seconds, in milliseconds)Minimum time between processing subsequent events for the same path.

Frequently Asked Questions

This section provides answers to frequently asked questions about Federation events and their lifecycle.

plusFAQs
Q: What event types drive Federation synchronization?

A: Artifact-level events are CREATE, UPDATE, DELETE, and PROPS. Repository-level events are REPO_CREATE, REPO_UPDATE, REPO_DELETE, REPO_SYNC, and REPO_STATUS_CHANGE. See Artifact Event Types for details.

Q: What happens if the same artifact is created and then deleted before syncing?

A: The deduplication logic can eliminate both the CREATE and DELETE events before propagation, controlled by the federated.skip.create.eliminate.delete.on.deduplication property.

Q: How many times does RTFS retry a failed event?

A: Failed events are retried up to the limit set by federated.event.queue.max.error.retries, which defaults to 6 attempts.

Q: What happens if events aren't propagated before the retention window expires?

A: The cleanup job can purge them, which forces the affected member into an ERROR_OUT_OF_SYNC state that requires a Full Sync to recover. See Event Retention and Cleanup.

Q: Why is there a grace period between events for the same artifact?

A: The grace period (60 seconds by default) avoids race conditions between nearly simultaneous events on the same path by controlling the minimum interval between processing them.

Related Topics


Did this page help you?