Eventarc in Google Cloud

Eventarc in Google Cloud

A complete, plain-English guide to the managed service that listens for things happening across Google Cloud, your own apps and partner tools, and delivers each one to the right place, reliably and securely, without you running any messaging servers.

Imagine you run an online photo-printing shop. A customer uploads a picture. Within a second you want a small copy made for the website, a safety check run on the image, a database row written, and a “thank you” message queued. Now imagine you had to write a program that keeps asking, every few seconds, “Has anyone uploaded a picture yet? How about now? Now?” That program would waste money, react late and break easily.

There is a far better way. Instead of asking again and again, you let the system tap you on the shoulder the moment something happens. That tap is called an event, and the service in Google Cloud that carries those taps from the place where they happen to the place where they are handled is called Eventarc.

In this guide you will learn what Eventarc is, how its parts fit together, how an event travels from start to finish, what can go wrong, how to keep it safe, and when to choose it over other tools. Every new word is explained the first time it appears, and every big idea comes with an everyday comparison. Take it one chapter at a time.

1What Eventarc Is and Why It Exists

Start with the simple idea: something happens, and something else needs to know about it.

The problem with asking again and again

Software has always needed to react to changes. A file arrives. A payment succeeds. A virtual machine is created. A message lands in a queue. In the early days, programmers solved this with polling. Polling means a program wakes up on a timer and checks whether anything new has appeared. It is like walking to your front door every two minutes to see if the postman is there.

Polling has three big problems. First, it wastes work, because most checks find nothing. Second, it is slow, because the news is only discovered at the next check. Third, it is hard to scale, because a thousand programs polling a thousand places create a thousand times the noise.

Everyday Analogy

Polling is like checking the front door every two minutes for the postman. An event-driven system is a doorbell. You can nap, cook or read, and the bell rings only when someone is really there. Eventarc is the wiring that connects every doorbell in a very large building to the right person inside.

So what is Eventarc?

Eventarc is a fully managed Google Cloud service for building event-driven architectures. “Fully managed” means Google runs the servers, patches them, scales them and keeps them available. You only describe what you want: “When this happens over there, send a message to that service over here.”

It can pick up events from several families of sources: Google Cloud services themselves, messages published to Pub/Sub, your own applications, and certain partner products. It then routes each matching event to a destination, such as a Cloud Run service, a Cloud Run function, a Workflows execution or a service on Google Kubernetes Engine (GKE). It wraps every event in a common shape called a CloudEvent, so your code sees the same kind of envelope no matter where the event came from.

A short history

Before Eventarc, Google Cloud already had triggers, but they were scattered. Cloud Functions had its own built-in triggers for storage and Pub/Sub. Cloud Run, which runs containers, had no easy way to say “start me when a file lands in a bucket.” Developers glued things together by hand using logging sinks and Pub/Sub topics.

Eventarc appeared in preview around 2020 and reached general availability in 2021. Its goal was to give every destination the same trigger experience, built on an open industry standard called CloudEvents, which is maintained by the Cloud Native Computing Foundation. Over time Google added support for more event sources and, more recently, a second edition called Eventarc Advanced with a central “bus,” message transformation and more flexible routing. You will meet both editions in this guide.

Managed
No brokers or servers for you to run
CloudEvents
One open envelope format for every event
At-least-once
Delivery promise you must design for

Why teams choose it

Teams reach for Eventarc because it removes plumbing. Without it, you would create a Pub/Sub topic, set up a log sink, write filter rules, create push subscriptions, configure authentication, and then write code to unwrap everything. With Eventarc you declare a trigger and a destination, and the platform builds and manages the pipework for you.

i
Remember

Eventarc is a router, not a database and not a long-term storage place for events. It moves events from where they happen to where they are handled. If you need to keep a permanent history, you store the events yourself after they arrive.

2The Vocabulary of Event-Driven Systems

A handful of words show up everywhere. Learn them once and the rest of the guide becomes easy.

Event, producer, router and consumer

An event is a small record that says “this thing happened at this time.” It is a fact about the past, such as “file report.pdf was created in bucket invoices” or “a new message was published to topic orders.” An event does not tell anyone what to do. It simply reports what occurred.

The part of the system where the event happens is the producer (also called the source or publisher). The part that reacts is the consumer (also called the handler, receiver or destination). In between sits the router, which decides who should hear about which event. Eventarc plays the router.

Everyday Analogy

Think of a school announcement system. The principal’s office (producer) reads a note into the microphone. The speaker wiring (router) decides which classrooms get the message. Each teacher (consumer) hears only the announcements meant for their class. The principal never needs to know how many classrooms there are or what each teacher does next.

Trigger, filter and payload

A trigger is the rule you create in Eventarc. It says: listen for events that match these conditions, and deliver them to this destination. The conditions are called filters. A filter might say “only events of type ‘object finalized’ from the bucket named photos-uploads.” Events that do not match are simply ignored by that trigger.

The payload (sometimes called the data) is the detailed content of the event, such as the file name, size and time. The metadata (the label on the outside) tells you the event’s type, where it came from and when it happened.

Coupling: why this style is popular

Coupling is how tightly two parts of a system depend on each other. In a tightly coupled design, the upload service must know about the thumbnail service, the safety checker and the notification sender, and must call each one directly. If one is slow or broken, the upload service suffers. In an event-driven design, the upload service just announces “a photo arrived.” Anyone who cares can listen. You can add a fifth listener tomorrow without touching the upload service at all. This is called loose coupling.

A quick glossary table

TermPlain meaningExample
EventA record that something happenedA file was uploaded
ProducerThe place the event comes fromCloud Storage bucket
RouterMoves events to the right placeEventarc
ConsumerThe code that reactsCloud Run service
TriggerA rule linking events to a destination“New image goes to resizer”
FilterA condition that selects eventsBucket name equals photos
CloudEventThe standard envelope for eventsType, source, id, time, data

Events versus commands

One subtle point trips up many beginners. An event says “this happened”. A command says “please do this.” Eventarc carries events. If you name your events like commands, for example “ResizeThisImage,” your design slowly becomes tightly coupled again, because the producer now secretly depends on what the consumer does. Good event names look like past-tense facts: “ImageUploaded,” “OrderPlaced,” “VmCreated.”

•
Good Habit

Name events as facts in the past tense. Let each listener decide what it wants to do about the fact.

3Core Concepts: Triggers, Providers, Channels and Locations

The original and most widely used edition of Eventarc is called Standard. It is built around triggers.

Two editions in one product

Eventarc comes in two editions. Eventarc Standard is the long-established one. You create triggers, and each trigger connects one kind of event to one destination. Eventarc Advanced adds a central bus, pipelines and enrollments, plus message transformation. This chapter covers Standard. Chapter 8 covers Advanced.

The building blocks of a Standard trigger

Required

Event provider and type

Which family of events you want, such as “an object was finalized in Cloud Storage” or “a message was published to Pub/Sub.”

Required

Filters

Extra conditions that narrow the stream, such as a particular bucket, topic, resource name or method name.

Required

Destination

Where matching events are delivered: Cloud Run, Cloud Run functions, Workflows, GKE or an internal HTTP endpoint.

Required

Service account

The identity Eventarc uses to deliver the event. It decides what the trigger is allowed to do.

Placement

Location

The region where the trigger lives. For many sources it must match the location of the source, such as a bucket’s region.

Optional

Channel

A connection that lets events from third-party providers flow into your project so a trigger can use them.

Event providers

An event provider is the kind of source that produces events. Eventarc Standard groups providers into a few families, which the next chapter explains in detail: direct events from Google Cloud services, events built from Cloud Audit Logs, events from Pub/Sub, and events from third-party providers.

Locations matter

Every trigger lives in a location. Think of it as the trigger’s home address. For many event types the trigger must live in the same region as the thing it watches. If your bucket lives in one region, your trigger usually belongs in that region too. Some event families can use a “global” location. Choosing locations carefully keeps delivery fast, helps with data-residency rules (laws or company policies about where data may be processed) and avoids confusing errors when a trigger will not create.

Everyday Analogy

A trigger is like a mail-forwarding rule at the post office. You write on a card: “Anything addressed to this house, and marked ‘parcel,’ goes to my office.” The house is the source, the word “parcel” is the filter, and the office is the destination. The post office handles the rest every day without asking you again.

Channels for outside providers

When an event comes from a partner company’s product rather than from Google Cloud, a direct line is needed. A channel is that line. The partner publishes into the channel, and your triggers can then listen to it. This lets you react to events from monitoring, security or other software-as-a-service tools in the same way you react to a storage upload. The list of supported partners changes over time, so always check the current documentation before planning around one.

!
Watch Out

A trigger cannot be edited into any shape you like after creation. Some settings, such as the event type and location, are fixed once the trigger exists. If you need to change them, plan on creating a new trigger and removing the old one.

4Where Events Come From: The Four Source Families

Choosing the right kind of source is the first design decision, and it affects speed, cost and reliability.

1. Direct events from Google Cloud

Some Google Cloud services publish events straight to Eventarc. These are called direct events. Examples include Cloud Storage reporting that an object was finalized or deleted, and several other products such as Firestore, Cloud Build, Artifact Registry and Firebase services. The exact list grows over time.

Direct events are usually the best choice when one is available. They are quick, because there is no middle step, and they carry a clear, purpose-built payload that describes the change.

2. Cloud Audit Logs events

Cloud Audit Logs is Google Cloud’s record of “who did what, where and when.” Whenever someone calls an API, such as creating a VM, changing a firewall rule or reading a dataset, an audit entry can be written. Eventarc can turn a matching audit entry into an event. This gives you a way to react to a very wide range of actions across dozens of Google Cloud services, even those that do not publish direct events.

There are two kinds of entries. Admin Activity logs record changes to configuration and are on by default. Data Access logs record reads and writes of user data. These are often off by default for most services, so you must turn them on before a trigger can use them. Turning them on can increase logging volume and cost, so do it only where needed.

3. Pub/Sub messages

Pub/Sub is Google Cloud’s messaging service, where publishers send messages to a topic and subscribers receive them. An Eventarc trigger can listen to a Pub/Sub topic and deliver each message to a destination as a CloudEvent. This is the natural choice for your own custom events: your application publishes “OrderPlaced” to a topic, and Eventarc routes it onward.

4. Third-party providers

Partner products can publish events into your project through a channel, as covered in the last chapter. This is helpful when important signals originate outside Google Cloud.

Comparing the families

FamilyBest forSpeedWatch out for
Direct eventsCommon changes in supported servicesFastOnly available for certain services and event types
Cloud Audit LogsBroad coverage of API actionsSlower than directData Access logs must be enabled and add log volume
Pub/SubYour own custom application eventsFastYou design the message format and naming
Third-partySignals from partner toolsDepends on partnerPartner list changes, setup needs a channel
Everyday Analogy

Direct events are like a smoke detector wired to the fire station: instant and made for one job. Audit Logs are like reviewing the security camera tape: it covers nearly everything, but you learn about it a little later. Pub/Sub is like a suggestion box you design yourself. Third-party events are like a neighbour who phones you when they see something suspicious on their street.

i
Design Tip

Prefer a direct event when one exists. Fall back to Audit Logs only when no direct event covers what you need, and use Pub/Sub for events that your own code creates.

5Where Events Go: Destinations

A destination is the code or service that receives the event and does the actual work.

Cloud Run services

Cloud Run runs your containers without you managing servers. When an event arrives, Eventarc sends it to your service as an ordinary web request (an HTTP POST). Your service reads the request, does its job and replies with a success code. Cloud Run can scale from zero copies to many, so a quiet period costs almost nothing and a sudden burst of events is handled by starting more copies.

Cloud Run functions

Cloud Run functions (the newer name for second-generation Cloud Functions) let you write a small piece of code that runs when an event arrives, without thinking about containers at all. Under the hood, event-driven functions use Eventarc triggers. This is the lightest way to react to a single event, such as writing a log line or updating a record.

Workflows

Workflows is Google Cloud’s orchestration service. It runs a series of steps in a defined order: call this service, wait, check the answer, call that service, handle errors. An Eventarc trigger can start a workflow execution and hand it the event as input. Use this when one event must start a multi-step process rather than a single action.

Google Kubernetes Engine (GKE)

If your applications run on GKE, Eventarc can deliver events to a service inside your cluster. This keeps event handling next to the rest of your Kubernetes workloads. It needs some extra setup on the cluster side, such as allowing the right identities to work with it, so follow the current setup guide for your cluster type.

Internal HTTP endpoints

Eventarc Standard can also deliver to an internal HTTP endpoint inside a private Virtual Private Cloud (VPC) network. A VPC is your own private, walled-off network inside Google Cloud. This is useful when the handler is not public on the internet and should stay private.

Best for

Cloud Run service

Full web applications and containers that handle events along with other work.

Best for

Cloud Run function

Short, single-purpose reactions with the least setup.

Best for

Workflows

Multi-step processes with ordering, waiting and error handling.

Best for

GKE service

Teams already running Kubernetes who want events inside the cluster.

Best for

Internal endpoint

Private handlers that must never be exposed to the public internet.

Advanced edition

More targets

Advanced pipelines can also deliver to a Pub/Sub topic, another bus and more kinds of HTTP endpoints.

Everyday Analogy

Choosing a destination is like choosing who answers a customer’s call. A single helpful clerk (Cloud Run function) can handle a quick question. A full department (Cloud Run service) can handle bigger jobs. A project manager (Workflows) coordinates several people in the right order. Your own in-house team (GKE) answers when the work must stay inside the building.

What the destination must do

Whatever you pick, the destination must follow one simple contract. It receives the event, does its work, and answers with a success status quickly. A success reply tells Eventarc “got it, you can stop.” Any failure reply, or no reply in time, tells Eventarc “try again later.” This simple handshake is the foundation of reliable delivery, which Chapter 10 explores.

!
Watch Out

Do not do very long work before replying. If your handler needs a long time, accept the event, hand the heavy work to something else such as a queue or a workflow, and reply right away.

6Architecture and Components

Now put the pieces on one map, so you can see how an Eventarc Standard setup is built.

The big picture

Every Standard setup has the same basic shape. On the left are the sources. In the middle is Eventarc, with its trigger and delivery machinery. On the right are the destinations. Underneath, a Pub/Sub topic acts as the transport that carries events safely from the trigger to the delivery step.

flowchart LR
  A["Event Source: Cloud Storage, Audit Logs or Pub/Sub"] --> B["Eventarc Trigger with Filters"]
  B --> C["Transport Topic in Pub/Sub"]
  C --> D["Eventarc Delivery with Identity Token"]
  D --> E["Cloud Run Service"]
  D --> F["Cloud Run Function"]
  D --> G["Workflows Execution"]
  D --> H["GKE Service"]
Figure 1. Eventarc Standard: from event source to destination through a trigger and a transport topic.

Walking through the map

The event source is where the change happens. The trigger checks each incoming event against its filters. Matching events are placed onto a transport topic, which is a Pub/Sub topic that Eventarc creates and manages for you in most Standard setups. The transport topic gives you buffering and retry behaviour that you would otherwise have to build. The delivery step then pushes the event to the destination as an authenticated web request.

The identities involved

Three kinds of identity take part, and mixing them up is a very common source of errors.

  • The trigger service account is the identity you choose. Eventarc uses it when delivering events, so it needs permission to receive events and to call your destination.
  • The Eventarc service agent is a Google-managed identity that Eventarc uses behind the scenes to create and manage supporting resources.
  • The destination’s own identity is what your handler uses when it calls other services after the event arrives.
Everyday Analogy

Picture a courier company. The sender’s shop is the event source. The dispatch desk is the trigger that checks each parcel’s label. The sorting room with shelves is the transport topic, where parcels wait safely. The delivery van is the delivery step, and the courier shows an ID badge at the door. That badge is the identity token that proves the parcel really came from the courier company.

Regional design

Eventarc resources are regional. The trigger, the transport topic and the destination are normally placed in the same region, or the trigger sits in a region that matches the source. Keeping everything close shortens the delivery path. For disaster planning, teams that need higher availability often create matching triggers and destinations in more than one region and design handlers that can safely process the same event twice.

What Eventarc does not do

It does not transform the content of your events in Standard (the Advanced edition adds this). It does not guarantee the order in which events arrive. It does not keep a permanent archive. Knowing these limits helps you decide what extra pieces you need.

•
Good Habit

Draw your event flow on paper before building. Mark each source, each trigger, each destination and each identity. Most mistakes become visible on the drawing long before they show up in production.

7Internal Working: The Life of One Event

Follow a single photo upload from the moment it happens to the moment it is fully handled.

The step-by-step journey

1

Something happens

A customer uploads a photo. Cloud Storage finishes writing the file and notes that the object was finalized.

2

The source reports it

Cloud Storage sends an event to Eventarc describing the new object: its bucket, name, size and time.

3

Filters are checked

Eventarc compares the event to every trigger in that location. Triggers whose filters match are selected. Others ignore it.

4

The event is wrapped and stored

The event is shaped into a CloudEvent and placed on the transport topic, where it waits safely until it is delivered.

5

Delivery with proof of identity

Eventarc sends an HTTP POST to the destination, including an identity token created for the trigger’s service account.

6

The handler does its work

The destination checks the token, reads the event, creates the thumbnail and replies with a success status.

7

Acknowledgement or retry

A success reply ends the journey. A failure or a timeout leads to another attempt after a growing pause.

sequenceDiagram
  participant U as Customer
  participant S as Cloud Storage
  participant E as Eventarc Trigger
  participant P as Transport Topic
  participant H as Cloud Run Handler
  U->>S: Upload photo
  S->>E: Object finalized event
  E->>E: Match trigger filters
  E->>P: Place CloudEvent on topic
  P->>H: Deliver HTTP POST with identity token
  H-->>P: Reply with success status
  Note over P,H: If the reply fails or times out the delivery is retried with backoff
Figure 2. Sequence of one event from upload to acknowledged delivery.

Push delivery

Eventarc pushes events to your destination. Your handler does not need to run a loop asking “anything new?” It simply waits for requests. Push delivery is why a Cloud Run service can scale down to nothing between events and wake up when one arrives.

Acknowledgement and retries

The success reply is called an acknowledgement. Until Eventarc receives one, it treats the event as not yet handled. When delivery fails, it tries again using exponential backoff, which means the pause between attempts grows each time, for example a short wait, then a longer one, then longer still. This protects a struggling handler from being flooded while it recovers. Retries are limited in time, with a default retention measured in about a day for Standard events carried by Pub/Sub, so an event that cannot be delivered for long enough is eventually dropped. Check current documentation for exact limits.

Everyday Analogy

Retrying with backoff is like knocking on a friend’s door. If nobody answers, you do not hammer the door every second. You wait a minute, knock again, then wait five minutes, then fifteen. You give your friend time to get to the door, and you do not annoy the whole street.

Why audit-log events are slower

Direct events go straight from the service to Eventarc. Audit-log events first need the action to be written to the log, then matched and forwarded. That extra hop is why audit-based triggers usually show higher delay. For tasks where seconds matter, choose a direct event or a Pub/Sub message if you can.

i
Design Tip

Never assume the handler runs exactly once or right away. Always assume “at least once, sometimes a little late, sometimes out of order.” Design for that and your system stays calm under stress.

8Eventarc Advanced: Buses, Pipelines and Enrollments

The Advanced edition keeps the same goal but changes the shape: one central place where events gather, and flexible rules that decide where they go.

Why a second edition?

In Standard, each trigger connects one source to one destination. That is simple, but in a large company it can lead to hundreds of separate triggers that are hard to see as a whole. Teams also wanted to change the shape of an event before delivery, collect events from many places in one spot, and share a stream across teams. Eventarc Advanced was built for these needs.

The three new building blocks

Collects

Message bus

A central place that receives events from many sources, including Google Cloud services and your own applications, which publish to it in the CloudEvents format.

Delivers

Pipeline

The path to one destination. It can also apply a change to the event, such as reshaping the data or converting between formats like JSON, Avro and Protobuf.

Matches

Enrollment

A rule that links a bus to a pipeline. It uses an expression written in a small rule language (Common Expression Language, or CEL) to say which events go through.

Connects

Google API source

A resource that connects a bus to events from Google Cloud services, so those events flow onto the bus.

flowchart LR
  S1["Google API Source"] --> B["Message Bus"]
  S2["Your Application via Publishing API"] --> B
  B --> N1["Enrollment A with Match Rule"]
  B --> N2["Enrollment B with Match Rule"]
  B --> N3["Enrollment C with Match Rule"]
  N1 --> P1["Pipeline 1 with Transformation"]
  N2 --> P2["Pipeline 2"]
  N3 --> P3["Pipeline 3"]
  P1 --> D1["Cloud Run Service"]
  P2 --> D2["Workflows"]
  P3 --> D3["Pub/Sub Topic"]
Figure 3. Eventarc Advanced: many sources feed a bus, enrollments select events, pipelines deliver them.
Everyday Analogy

Standard is a set of private phone lines, one line per pair of people. Advanced is an airport. All flights (events) arrive at one terminal (the bus). Signs and gates (enrollments) decide which passengers go where. Each gate has its own corridor (pipeline) to a plane (destination), and a customs desk on the way can check or repack luggage (transformation).

Transformation

A pipeline can change an event before it reaches the destination. Why does this matter? Imagine an older handler that expects a certain format, while the source sends another. Instead of writing glue code, you let the pipeline convert the message. This is especially handy when connecting systems built by different teams at different times.

Standard versus Advanced

QuestionStandardAdvanced
Basic shapeOne trigger links one source type to one destinationBus, enrollments and pipelines in a flexible mesh
Best forStraightforward reactions and quick startsMany teams, many sources, shared event streams
Change event contentNot built inSupported through pipeline transformation
Your own eventsUsually through Pub/Sub topicsPublish straight to a bus
Central visibilitySpread across many triggersOne bus acts as a shared hub
Learning effortLowerHigher, with more concepts
•
Which one should you start with?

If you have a few simple reactions, start with Standard. Move to Advanced when you find yourself managing many triggers, needing to reshape events, or wanting one shared stream for several teams. The two editions can live side by side in the same project.

9The Event Envelope: CloudEvents

Every event Eventarc delivers wears the same kind of envelope, so your code always knows where to look.

What is CloudEvents?

CloudEvents is an open specification that describes how to label an event. Without a shared standard, every service invents its own labels, and every handler needs special code for each one. With CloudEvents, a small set of standard labels sits on the outside, and the service-specific details sit on the inside.

The standard labels

LabelWhat it tells youExample idea
idA unique number for this event, handy for spotting duplicatesA long unique string
sourceWhere the event came fromA particular bucket or topic
typeWhat kind of thing happenedAn object was finalized
specversionWhich version of the CloudEvents rules is usedVersion 1.0
timeWhen it happenedA date and time stamp
subjectThe specific item involved, where the source provides oneThe name of the file
datacontenttypeThe format of the data insideJSON
Everyday Analogy

Think of a shipping label on a parcel. Whether the parcel holds shoes or books, the label always has a sender, a type of service, a tracking number and a date. The delivery driver reads the label without opening the box. CloudEvents labels do the same job for events, and the box inside holds the details that only the final receiver needs.

How the envelope reaches your handler

For Eventarc triggers that deliver by HTTP, the CloudEvents labels usually arrive as web request headers, and the payload arrives in the request body. This style is called binary content mode. Another style puts both labels and data together in the body, called structured content mode. Your handler can read either, and many ready-made libraries for CloudEvents do the unpacking for you.

Use the id to spot duplicates

Because delivery is at-least-once, the same event can show up twice. The id label is your friend here. Your handler can note the ids it has already processed and skip any repeat. This idea has a name, idempotency, which Chapter 10 explains.

The data inside

The data section is specific to the source. A storage event carries bucket and object details. A Pub/Sub event carries the message and its attributes. An audit-log event carries the log entry describing the API call, including who made it and which resource was affected. Read the documentation for the event type you use, since field names and shapes differ.

i
Design Tip

Keep your handler’s “unwrap the envelope” code in one small place. If the event shape ever changes, you only fix one spot instead of hunting through your whole application.

10Delivery Guarantees, Retries, Duplicates and Ordering

This is the chapter that separates a demo from a dependable production system.

The three delivery promises

Messaging systems usually offer one of three promises. At-most-once means an event is delivered zero or one time, so it can be lost but never repeated. At-least-once means it is delivered one or more times, so it is never lost on purpose but may be repeated. Exactly-once means one time only, which is extremely hard to guarantee across separate systems. Eventarc follows the at-least-once model, so your handler should be ready for repeats.

Idempotency: doing the same thing twice safely

A handler is idempotent when running it twice has the same final effect as running it once. Setting a light switch to “on” is idempotent: pressing “set to on” ten times leaves the light on. Adding one to a counter is not: ten presses give ten. Many real tasks can be made idempotent with small tricks.

  • Record each event id in a table, and skip an id you have seen before.
  • Use “create or replace” style writes that end in the same state however many times they run.
  • Give each result file a name based on the event id, so a repeat overwrites the same file instead of creating a second one.
  • Use a unique key in the database so a second insert is rejected.
Everyday Analogy

Idempotency is like an elevator button. Pressing “floor 5” again and again does not send the elevator to floor 5 five times. The system understands that you want one result. A good event handler behaves like that button.

Ordering is not guaranteed

Events can arrive in a different order from the one in which they happened. A “file deleted” event might reach you before the “file created” event for the same file, especially after a retry. Handlers should look at the time label and, where it matters, check the current state of the resource before acting. If strict order is vital, you may need a design that includes a sequence number or a source that supports ordered delivery.

Failures and what happens next

Short glitch

Handler is briefly unavailable

Retries with growing pauses usually succeed once the handler recovers.

Bad event

Handler always fails on one event

Retries repeat until the retry window ends, which wastes work. Catch known bad inputs and reply with success after recording the problem elsewhere.

Long outage

Destination is down for hours

Events wait and retry for a limited period. If the outage is longer than that period, some events can be lost.

Overload

Too many events at once

Cloud Run scales up, but limits on instances or downstream databases can still cause failures. Set limits that match what your database can take.

Planning for events you cannot afford to lose

Retries buy time, not forever. For events that truly must not be lost, such as financial records, design a safety net. A common approach is to have your handler save the raw event to a durable place first, such as a Pub/Sub topic with a dead-letter topic (a special topic where messages that keep failing are parked for later inspection) or a database table, and then process it. In the Advanced edition, pipelines expose retry settings, so review the options available to you. A scheduled repair job that compares “what should exist” with “what does exist” is also a wise backup.

!
Watch Out

Do not reply with success before your work is safely saved. If you acknowledge first and then crash, Eventarc believes the job is done, and the event is gone.

Poison events and the quiet drop

A poison event is one that your code can never handle, for instance because it has a missing field. If your handler replies with an error every time, retries burn resources until the window closes. A kinder approach is to detect the problem, write the event to an “inspect later” place, and reply with success so the system moves on.

11Security: Identities, Permissions and Private Paths

Events can carry sensitive information and can start powerful actions, so every step needs a lock.

Identity and Access Management (IAM)

IAM is Google Cloud’s permission system. It answers the question, “Who is allowed to do what to which resource?” Permissions are grouped into roles, and roles are given to principals such as users and service accounts. A service account is an identity for a program rather than a person.

The roles that make triggers work

For a Standard trigger delivering to Cloud Run, the trigger’s service account generally needs two kinds of permission: the right to receive events through Eventarc (the Eventarc Event Receiver role) and the right to invoke the destination (for Cloud Run, the Cloud Run Invoker role). The person creating the trigger also needs permission to create it and to act as the service account. Exact roles can change, so use the current setup guide for your destination type.

Authenticated delivery

Eventarc signs each delivery with an identity token (an OpenID Connect or OIDC token) created for the trigger’s service account. Your destination service checks this token. Cloud Run does the checking for you when you keep the service private and require authentication. The result is that only Eventarc, acting as the identity you chose, can send events to your handler.

Everyday Analogy

Picture an office building with badge doors. The courier company has been issued one badge that opens only the mail room, nothing else. Even if someone steals the courier’s van, they cannot get into the server room. A trigger’s service account should be that badge: it opens exactly the doors it needs.

Least privilege

The principle of least privilege says give each identity only the permissions it truly needs. Create a dedicated service account for each trigger or group of similar triggers, rather than reusing a powerful, shared one. If a single account is compromised, the damage stays small.

Do not leave the door open

A common beginner shortcut is to allow unauthenticated calls to a Cloud Run service so that everything “just works.” This means anyone on the internet could send fake events to your handler. Keep authentication on, and let only the trigger’s service account call it.

Audit logs and sensitive operations

Audit-log triggers are a powerful security tool. You can react when a firewall rule is changed, a storage bucket is made public, or a service account key is created, and automatically start a repair or send an alert. Remember that enabling Data Access logs adds volume and may contain sensitive details, so control who can read those logs.

Network controls and data protection

  • Private destinations: Standard can deliver to internal endpoints inside a VPC, so handlers need not be public.
  • VPC Service Controls: A feature that draws a protective boundary around Google Cloud services to reduce the chance of data leaving. Check the current compatibility notes for the event types you use.
  • Encryption: Data is encrypted in transit and at rest by default. Customer-managed encryption keys (CMEK) are supported in some configurations when your rules require your own keys.
  • Organization policies: Rules set at the company level can limit where resources are created, which interacts with trigger locations.
i
Security Habit

Never trust the content of an event blindly. Validate fields, check that the file name or resource is one you expect, and treat user-supplied values inside events as untrusted input.

12Monitoring, Logging and Metrics

An event system works quietly. That is a gift when it works and a trap when it fails, because nobody notices silence.

Three questions to answer

Good monitoring of an event pipeline answers three simple questions. Are events arriving? Are they being handled successfully? Are they handled quickly enough? Every dashboard and alert you build should map to one of these.

Where to look

Metrics

Cloud Monitoring

Track event counts and delivery results for triggers, plus the health of the destination such as request count, error rate and latency.

Logs

Cloud Logging

Your handler’s own logs show what it did with each event. Include the event id in every log line so you can follow one event end to end.

Backlog

Transport topic health

For Standard triggers, the age of the oldest undelivered message on the underlying topic is an early warning that delivery is stuck.

Traces

Cloud Trace

Shows how long each step took when one event causes calls to several services.

Alerts worth having

  • A rise in the error rate of the destination service.
  • A growing backlog, meaning events are waiting longer than usual.
  • A drop to zero events when you normally see a steady flow. Silence can be a failure too.
  • Latency beyond what your business can tolerate, measured from event time to finished work.
Everyday Analogy

Monitoring an event pipeline is like watching a water pipe in a house. You want to know if water is flowing (events arriving), whether any leaks have appeared (errors) and how long the water takes to reach the tap (latency). A pipe that goes quiet is as worrying as one that bursts.

Correlation: following one event

When something goes wrong at 3 a.m., you will want to ask, “What happened to the event for order 12345?” That is only possible if you planned for it. Put the CloudEvent id and any business key, such as an order number, into your logs. Pass them along to any next service you call. With these two habits, a search for one id gives the full story.

Cost awareness

Pricing for Eventarc differs between the Standard and Advanced editions, and between event families, so read the current pricing page before you plan at large scale. Remember the hidden costs around it: Cloud Run request time, Pub/Sub usage, Cloud Logging volume (especially Data Access audit logs) and calls to downstream databases. A noisy trigger with weak filters can create real bills fast.

!
Watch Out

Filter as narrowly as you can. A trigger that listens to events from many resources, when you only care about one bucket or one kind of event, makes your handler wake up thousands of times for nothing.

13Advantages, Disadvantages and Trade-offs

No tool is perfect. A fair look at both sides helps you decide when Eventarc is the right fit.

Advantages

  • Fully managed, so there are no brokers to patch or scale.
  • One consistent trigger experience across many destinations.
  • Open CloudEvents format reduces custom parsing code.
  • Wide reach through Google Cloud events, Pub/Sub, audit logs and partners.
  • Authenticated delivery with identities you control.
  • Scales with demand and works well with scale-to-zero destinations.
  • Advanced edition adds a shared bus, transformation and flexible routing.

Disadvantages

  • At-least-once delivery means you must handle duplicates.
  • No guaranteed ordering of events.
  • Retries are time-limited, so it is not a permanent event store.
  • Audit-log events add delay and need log settings to be turned on.
  • Regional placement and fixed trigger settings need careful planning.
  • The event types available depend on each service, and the list changes over time.
  • Two editions mean more concepts to learn.

The big trade-offs in plain words

Simplicity against control. Eventarc hides the plumbing, which makes it simple. In return, you cannot tune every low-level detail the way you could with your own Pub/Sub subscriptions or a self-run broker.

Speed against coverage. Direct events are fast but limited to certain services. Audit logs reach nearly everything but arrive later.

Loose coupling against visibility. When many small pieces react to events, no single place shows the whole flow. Without good naming, logging and diagrams, debugging gets harder. Event-driven systems trade easy-to-see code paths for flexibility.

Reliability against cost. Adding backups such as dead-letter topics, state tables and repair jobs makes the system sturdier but adds cost and moving parts.

Event-driven design trades a straight line you can read for a web you can grow. Draw the web.

14Design Patterns and Anti-patterns

A pattern is a proven way to solve a common problem. An anti-pattern is a tempting mistake that causes trouble later.

Useful patterns

Pattern

Fan-out

One event goes to several independent handlers. An upload can start a thumbnail job, a scan and a notification at once. Each handler works on its own and fails on its own.

Pattern

Orchestration with Workflows

One event starts a workflow that runs steps in order, waits for answers and handles errors. Good for processes such as order fulfilment.

Pattern

Choreography

Each service reacts to events and may publish new ones, with no central boss. It scales nicely but needs strong documentation to stay understandable.

Pattern

Claim check

Keep large files in storage and send only a small event with a pointer to them. Handlers fetch the file when needed, which keeps events light.

Pattern

Idempotent receiver

Handlers record processed ids so repeated events cause no extra effect. This is the most important pattern for at-least-once delivery.

Pattern

Auto-remediation

An audit-log event about a risky change, such as a bucket made public, starts a function that fixes it and alerts the security team.

Everyday Analogy

Orchestration is a conductor leading an orchestra: one person tells everyone when to play. Choreography is a dance in which each dancer watches the others and responds. A conductor gives you tight control. A dance gives you freedom but needs everyone to know the steps.

Anti-patterns to avoid

ANTI-PATTERN 01 · THE ENDLESS LOOPAvoid
What it looks like

A handler is triggered by new files in a bucket. It processes each file and writes the result back into the same bucket. The new result file triggers the handler again, which writes another file, and so on, forever.

Why it hurts

The loop can run up costs very quickly and flood your logs. It is one of the most common and expensive event-driven mistakes.

What to do instead

Write results to a different bucket, or use naming rules and checks so the handler ignores its own output. Test with a small trial to confirm that one input causes one run.

flowchart LR
  A["Bucket"] -->|"object finalized"| B["Eventarc Trigger"]
  B --> C["Cloud Run Handler"]
  C -->|"writes result into same bucket"| A
Figure 4. The endless loop: output lands where the trigger is listening.
ANTI-PATTERN 02 · THE ASSUMED ONCEAvoid
What it looks like

A handler sends a customer email or charges a card each time it runs, without ever checking whether it has handled this event before.

Why it hurts

A retry or duplicate delivery sends two emails or charges twice.

What to do instead

Record the event id before doing the side effect, and skip repeats. Use idempotency keys when calling payment or email services that support them.

ANTI-PATTERN 03 · THE FAT EVENTAvoid
What it looks like

Teams cram huge amounts of data, even whole files, into events so that handlers never need to look anything up.

Why it hurts

Messages have size limits, big events are slow and costly, and sensitive data spreads into more places than it should.

What to do instead

Send a small event with identifiers and a pointer. Let the handler fetch the details securely when it needs them.

ANTI-PATTERN 04 · THE SLOW HANDLERAvoid
What it looks like

A handler does minutes of heavy work before replying, so the reply arrives after the delivery timeout.

Why it hurts

Eventarc assumes failure and sends the event again, so the same long job starts twice or more.

What to do instead

Accept the event, hand the heavy job to a queue or a workflow, and answer quickly.

15Best Practices and Common Mistakes

A short checklist you can use on your next build.

Best practices

1

Choose the right source

Use direct events first, Pub/Sub for your own events, and audit logs when nothing else fits.

2

Filter tightly

Narrow triggers to the exact bucket, topic or method you care about so handlers wake only when needed.

3

Make handlers idempotent

Assume repeats and design so they do no harm.

4

Reply fast, work safely

Save the event durably, hand off long work and acknowledge promptly.

5

Use dedicated, minimal identities

One service account per trigger group, with only the roles it needs, and authentication always on.

6

Log the event id everywhere

Correlation makes midnight debugging possible.

7

Alert on silence as well as errors

A flow that suddenly stops is a failure too.

8

Document the flow

Keep a diagram of sources, triggers and destinations. Update it when anything changes.

Common mistakes

Mistake

Missing permissions

The trigger exists but never delivers because the service account lacks the receiver or invoker role. Check IAM first when nothing arrives.

Mistake

Wrong location

The trigger is created in a region that does not match the source, so it cannot be created or never fires.

Mistake

Audit logs not enabled

A Data Access trigger is built, but the matching logs are off, so no events appear.

Mistake

Forgetting ordering

Code assumes “created” arrives before “deleted.” Real life says otherwise.

Mistake

Public handlers

Unauthenticated access is switched on for convenience and never switched off.

Mistake

Skipping a load test

A burst of events overwhelms a database connection limit that nobody had measured.

A simple troubleshooting order

When events do not arrive, check in this order: first, is the source really producing events (and are any needed audit logs on)? Second, does the trigger’s location and filter match? Third, does the service account have the right roles? Fourth, is the destination reachable and returning success? Fifth, what do the destination’s logs say about the request? Following the same path each time turns panic into a routine.

16Real-World Usage Scenarios

These typical situations show how companies of many kinds use event-driven designs on Google Cloud. They are illustrative patterns, not accounts of any one company’s private setup.

Media and photo platforms: processing uploads

A photo or video site stores each upload in Cloud Storage. A direct storage event starts a Cloud Run service that creates smaller copies, extracts text or labels with a machine-learning service, and writes details to a database. Because the handler is idempotent and named by event id, a repeat delivery simply overwrites the same result.

Online retail: order fulfilment

When an order is placed, the shop application publishes an “OrderPlaced” message to Pub/Sub. An Eventarc trigger starts a Workflows execution that checks stock, asks the payment service to charge the card, books a courier and sends a confirmation. If payment fails, the workflow runs a clean-up step. Orchestration keeps the order steps visible in one place.

Banks and regulated firms: security guardrails

Audit-log events tell a security function whenever a firewall rule is opened to the whole internet or a storage bucket becomes public. A Cloud Run function checks the change against policy, reverts it if needed and pages the security team. This turns a written rule into an automatic guard that works around the clock.

Data and analytics teams: ingesting files

Partners drop daily files into a bucket. A storage event starts a job that validates the file, loads it into BigQuery and records the result. A “claim check” style event carries only the file location, not the file itself, so large files cause no trouble.

Ride and delivery apps: many teams, one stream

A large organisation with many teams can use Eventarc Advanced so that applications publish business events to a shared bus. Pricing, fraud, notifications and analytics teams each create their own enrollments and pipelines, with a transformation so each team gets the shape it prefers. Nobody has to change the publisher when a new team joins.

Software teams: build and release automation

Events from Cloud Build or Artifact Registry tell a handler that a new image is ready. The handler can run scans, update a deployment record or notify a chat channel, giving release steps a reliable trigger without scheduled checks.

i
Pattern in Common

In every case the producer does not know who is listening, handlers are safe to repeat, and large data stays in storage while events stay small.

17Eventarc Compared with Nearby Tools

Google Cloud has several services that move messages or start work. Knowing the differences prevents using the wrong one.

ToolMain jobUse it when
EventarcRoutes events from many sources to destinationsYou want to react to things happening in Google Cloud, Pub/Sub or partner tools
Pub/SubMessaging backbone with topics and subscriptionsYou need fine control over subscriptions, ordering keys, dead-letter topics or many subscribers
Cloud SchedulerStarts work on a clockSomething must happen every hour or every night regardless of events
Cloud TasksQueue of individual jobs with rate controlYour code wants to hand off a specific job with retries and rate limits
WorkflowsRuns ordered steps across servicesA process has several steps, waits and error paths
Cloud Logging sinksCopies logs to other placesYou are exporting logs for storage or analysis, not triggering handlers

Eventarc and Pub/Sub together

These two are friends, not rivals. Pub/Sub is the pipe system underneath, and Eventarc is the smart junction that connects many sources to many destinations. Choose Eventarc when you want the simple, managed trigger experience. Choose plain Pub/Sub when you need fine control over how messages are pulled, grouped or ordered.

If you know other clouds

Readers who know other clouds may find a loose comparison helpful. The Advanced edition, with its bus and rules, plays a role similar to the event bus services found on other major clouds, while Standard triggers are closer to the simple “when this happens, run that” rules. The match is not exact, so rely on Google Cloud’s own documentation for details.

18Performance, Scalability and High Availability

What happens when ten events a day become ten million? This chapter explains how the pieces behave under pressure and how to keep them dependable.

Where the time goes

The time between “something happened” and “work finished” is called end-to-end latency. It is made of several smaller delays added together: the source noticing the change, Eventarc matching and storing the event, the delivery request travelling to the destination, the destination starting up if it was asleep, and finally your own code running. Knowing the parts helps you find which one is slow.

  • Source delay: Direct events are quick. Audit-log events wait for the log entry to be written first.
  • Routing delay: Matching filters and placing the event on the transport topic is usually small compared with the rest.
  • Cold start: A Cloud Run service that has scaled to zero needs a moment to start a fresh copy when the first event arrives. This pause is called a cold start.
  • Handler time: Your own code, plus any database or network calls, is very often the biggest part.
Everyday Analogy

A cold start is like a small restaurant that closes its kitchen when no customers are inside. The first customer of the evening must wait while the cook turns on the stove. If you want the first customer served faster, you can pay to keep one cook always on duty. Cloud Run lets you keep a minimum number of copies warm for exactly this reason, at the price of paying for them even when idle.

Scaling up when events pile in

Eventarc itself is a managed service, so you do not add servers to it. The part you must plan for is the destination. Cloud Run starts more copies as more requests arrive, up to limits you can set. If a flood of events arrives, the transport topic holds events while the destination catches up, and delivery speeds up as more copies become available. Eventarc also slows down pushing events when it sees a destination returning errors, to avoid making a bad situation worse.

The hidden danger is not Cloud Run but what sits behind it. Suppose each handler opens a connection to a database that allows only a hundred connections. If Cloud Run starts five hundred copies, four hundred of them will fail. The fix is to cap the number of copies to what the database can take, share connections through a pooling layer, or place a queue in front of the slow part so work flows through at a steady rate.

Back-pressure: letting the system breathe

Back-pressure means the slow part of a system tells the fast part to ease off. In an event flow, the retry-with-backoff behaviour is a gentle form of back-pressure. If your handler answers with errors, deliveries slow down. For heavy jobs, a better design is to accept events quickly, drop them into a Cloud Tasks queue or a Pub/Sub subscription with a controlled pull rate, and process them at the pace your downstream systems like.

Bursts
Absorbed by the transport topic while handlers scale
Caps
Protect databases from too many copies at once
Warm copies
Reduce cold-start delay for urgent flows

Throughput and cost go hand in hand

Every event that wakes a handler costs a little: request time on Cloud Run, a share of the messaging behind the scenes, and a few log lines. At small scale these costs are tiny. At millions of events per day they become a real line on the bill. Two habits keep them in check. First, filter so that only useful events reach a handler. Second, keep each handler short and efficient, because the time your code runs is the time you pay for. A handler that finishes in fifty milliseconds instead of five hundred does ten times as many jobs for the same money, and it frees up capacity for the next burst.

Batching can help in some designs. If your task is “add a row to a report,” doing one database write per event may be wasteful. A common approach is to collect many events into a small holding area and write them together every few seconds. The trade-off is a little more delay and a little more complexity, so only add batching when measurements show you need it.

High availability

High availability means the system keeps working even when parts fail. Eventarc is a regional managed service, and Google runs it across several zones within a region, so the loss of a single data centre room does not stop it. Your own design adds to this in a few ways.

  • Run your destination in a regional service that spreads copies across zones, which Cloud Run does by default.
  • Make handlers idempotent so that retries after a partial failure are harmless.
  • For the most important flows, consider a second region with its own trigger and destination, and decide ahead of time how the two regions avoid doing the same work twice.
  • Keep a repair job that can rebuild missing results by comparing the source of truth with the outputs.

Capacity planning in simple steps

1

Estimate the event rate

How many events per minute at a quiet time, at a normal time and on the busiest day of the year?

2

Measure one handler

How long does a typical event take, and how much memory does it need?

3

Find the weakest link

Which downstream system, such as a database or an outside service, can handle the fewest requests at once?

4

Set limits to match

Cap copies and rates so the weakest link is never overwhelmed, then run a load test to confirm.

i
Design Tip

Test with a burst that is ten times larger than you expect. Systems rarely fail at the average. They fail at the spike.

19Designing Your First Solution: A Walkthrough

Let us put everything together by designing, on paper, an image-processing flow for the photo-printing shop from the start of this guide.

Step 1: Write the story in one sentence

“When a customer uploads a photo, we want a web-sized copy made, a safety check run, and a record saved, and we must never charge for or print the same photo twice.” This one sentence names the event (an upload), the actions (three of them) and a rule (no repeats). Writing it down first prevents much confusion later.

Step 2: Pick the source

Uploads land in Cloud Storage, and Cloud Storage publishes a direct event when an object is finalized. That is the best choice: fast, purpose-built and no log settings needed.

Step 3: Choose the edition

There are only a few reactions and one team, so Eventarc Standard is enough. If five other teams later want to listen to uploads and each needs a different data shape, the design can move to Advanced.

Step 4: Decide how many handlers

The three actions have different speeds and different failure risks. The resizing is quick. The safety check calls an outside service and may be slow. The record-saving must never fail silently. Using fan-out, three separate triggers with the same filter send each upload to three small handlers. If the safety check is slow or down, the thumbnail and the record are still done.

flowchart LR
  U["Customer Upload"] --> B["Upload Bucket"]
  B --> T1["Trigger One"]
  B --> T2["Trigger Two"]
  B --> T3["Trigger Three"]
  T1 --> H1["Resizer Handler"]
  T2 --> H2["Safety Check Handler"]
  T3 --> H3["Record Keeper Handler"]
  H1 --> O["Separate Output Bucket"]
  H3 --> D["Database"]
Figure 5. Fan-out design: one upload, three triggers, three independent handlers, results stored away from the input bucket.

Step 5: Protect against the known traps

Trap

Endless loop

The resizer writes to a separate output bucket, so its own results never trigger it again.

Trap

Duplicate delivery

Each handler records the event id first. A repeat is recognised and skipped, and output files are named from the event id.

Trap

Slow handler

The safety check handler accepts the event quickly and hands the slow call to a queue, replying right away.

Trap

Open door

Each trigger has its own service account with only the invoke role on its own handler. Public access stays off.

Step 6: Plan the safety net and the watching

Failed events for the record keeper are saved to a durable parking place for review. A scheduled check once a night compares the list of uploads with the list of records and repairs any gaps. Dashboards track upload events arriving, handler errors, and the age of the oldest waiting event. An alert fires if no events arrive for an hour during business hours.

The design checklist

QuestionOur answer in this example
What event starts things?An object finalized in the upload bucket
Which source family?Direct event from Cloud Storage
Which edition?Standard, with three triggers
Which destinations?Three small Cloud Run services
How are repeats handled?Event id recorded, output named by event id
How do we avoid loops?Results go to a different bucket
What protects the database?A cap on the number of running copies
How do we notice trouble?Error, backlog and silence alerts
What catches lost events?A nightly comparison and repair job
Everyday Analogy

Designing an event flow before building it is like drawing a floor plan before building a house. Moving a wall on paper costs a pencil stroke. Moving a wall after the bricks are laid costs a great deal more. The checklist above is your floor plan.

•
Take This With You

The same six steps work for almost any Eventarc design: tell the story, pick the source, choose the edition, split the handlers, guard the traps and plan the watching.

20Frequently Asked Questions

Quick answers to the questions that come up most often.

Q1Is Eventarc the same as Pub/Sub?

No. Pub/Sub is a messaging service. Eventarc is an event router that often uses Pub/Sub underneath. It adds filtering, standard event formats, many sources and ready-made delivery to destinations.

Q2Does Eventarc guarantee that an event is delivered exactly once?

No. Delivery is at-least-once, so duplicates are possible. Design handlers to be idempotent.

Q3Can I count on events arriving in order?

No. Treat order as unreliable. Use the event time and the current state of the resource when order matters.

Q4What happens if my handler is down?

Eventarc retries with growing pauses for a limited time. If your handler recovers in time, the events are delivered. If the outage outlasts the retry window, events can be lost, so add a safety net for critical data.

Q5Why did my audit-log trigger never fire?

The most common reasons are that Data Access logs were not turned on, the method name or resource filter did not match, the location was wrong or the service account lacked permission.

Q6Can one event go to several destinations?

Yes. In Standard, create several triggers with the same filter. In Advanced, several enrollments on one bus can each send matching events to their own pipelines.

Q7Do I need Eventarc to trigger a Cloud Run function from a bucket?

Event-driven Cloud Run functions use Eventarc triggers behind the scenes, so you are already using it even if the setup screens look simpler.

Q8Can I publish my own events?

Yes. In Standard, publish to a Pub/Sub topic and trigger from it. In Advanced, applications can publish CloudEvents to a bus.

Q9How big can an event be?

Limits exist and depend on the source and edition. A good habit is to keep events small and send pointers to large data. Check the current quotas page for exact figures.

Q10Which edition should a beginner use?

Start with Standard for simple reactions. Consider Advanced when you need a shared bus, transformation or many teams working from one event stream.

Q11Is it free?

Pricing depends on the edition and event type, and may change. Beyond Eventarc itself, you also pay for destinations, Pub/Sub use and logging. Read the current pricing page and estimate with your expected event volume.

Q12How do I avoid an infinite loop?

Never let a handler write its output where its own trigger is listening. Use a separate bucket or topic, or check for and skip your own output.

21Summary and Key Takeaways

The whole guide in one place.

Key Takeaways

  • Eventarc is a managed event router. It carries events from Google Cloud services, Pub/Sub, your own apps and partners to destinations such as Cloud Run, Cloud Run functions, Workflows and GKE.
  • Pick the right source. Use direct events when available, Pub/Sub for custom events and audit logs for broad coverage, remembering that audit logs are slower and need settings enabled.
  • Standard and Advanced fit different needs. Standard uses simple triggers. Advanced adds a bus, enrollments, pipelines and transformation for shared, larger designs.
  • Design for at-least-once delivery. Expect duplicates, late arrivals and out-of-order events, and make every handler idempotent.
  • Secure every hop. Use dedicated service accounts with least privilege, keep authentication on, and validate event content.
  • Reply fast and save safely. Acknowledge quickly, hand off long work, cap handler copies to protect databases, and add a safety net for events you cannot lose.
  • Watch the flow. Monitor arrivals, errors, latency and silence, and put the event id in every log line.