connector -> endpoint -> consumer -> streamDataSources, endpoints, and resource ownership
How generated connector objects, endpoints, endpoint consumers, functions, and streams divide lifecycle responsibility.
When to use
Use this page when implementing maker hooks, owning resources, or diagnosing startup and shutdown.
Behavior
- A connector is configuration and shared transport identity; its runtime representation may be a DataSource, a DataSink, a managed connector, or a combination.
- An endpoint describes one route, method, topic, schedule, Activity, or Workflow on that connector.
- Binding creates an endpoint consumer that connects the transport-facing endpoint to an Input or Sink stream and its long-lived user function.
- Endpoint consumers do not have an independent start phase. Their owning transport or connector opens admission only after binding is complete.
- Request state is created for an accepted interaction and must remain reachable until its result, error, cancellation, or timeout boundary completes.
- During shutdown, network handlers drain before endpoint state is released; DataSinks and clients remain available while accepted graph work completes.
Construction and ownership
Runtime roles properties
Lifecycle owner and responsibility of each generated layer.
DataSourceruntime resourceOwns ordinary inbound admission and drains root invocations in stop.
DataSinkruntime resourceOwns outbound submission and remains alive through graph drain.
ManagedDataConnectorshared resourcestart/stop own clients and core resources; startAdmission/stopAdmission own connector-managed polling such as Temporal Workers.
Endpointconnector-owned objectStores transport policy and request/result state for one externally addressable operation.
Endpoint consumergraph bindingBridges an endpoint to a typed Input or Sink stream and exposes the function implementation.
Function instancemaker resultCreated once, reused while the binding is active, and released after dependent callbacks.
Server listeneradmission ownerStops accepting and drains native HTTP/gRPC handlers before graph dependencies are torn down.
Lifecycle outline
connector core -> endpoint -> endpoint consumer -> Input/Sink stream
start: core -> downstream -> worker admission -> sources -> servers
stop: servers -> sources -> worker admission -> pools -> graph -> sinks -> core -> release