SAService Architect Back to designer
SAService ArchitectDocumentation
Stream type KeyValue<K,V0> + ... + KeyValue<K,Vn> → R

MultiJoin

Correlates two or more keyed inputs with a variable, ordered set of value slots.

When to use

Use MultiJoin when a correlation can span a variable number of keyed event families or value types.

Behavior

  • The primary source occupies slot 0; additional sources occupy slots 1..N in rightSources order.
  • Any slot, including the third or a later input, may arrive first and initialize retained state safely.
  • The callback runs only after slot 0 contains at least one value. It receives K and one accumulated value collection per slot; an additional slot may still be empty.
  • Additional inputs may carry different V types. Runtimes expose heterogeneous additional values through their language-specific union, dynamic, or generic representation.
  • Returning true completes K and removes every slot; returning false retains state. TTL, context deadlines and renewTTL follow the same storage rules as Join.

General properties

Identity, ownership and operator-specific mode.

PropertyTypeDescription
typeTransformationType

Operator kind. It controls available properties, valid sources and generated interfaces.

RequiredAllowed: Input, Map, Filter, Join, MultiJoin, Process, FlatMap, FlatMapIterable, KeyBy, Merge, Split, Case, Sink, CycleLink, Error, Delay, When
namestring

Human-readable stream name shown in the designer and used to derive default generated symbols.

Required
joinStorageHashMap

State backend for values accumulated by key. The schema also reserves RocksDB and Aerospike enum values, but HashMap is the only backend currently implemented and exposed by the Designer.

RequiredDefault: HashMapAllowed: HashMap
serviceService

Service that owns the stream. Connected streams must belong to the same service.

Required

Connections properties

Upstream graph references accepted by this operator.

PropertyTypeDescription
leftSourceKeyValue<K,V0> stream

Primary keyed input stored in value slot 0. Join and MultiJoin callback eligibility is anchored to this input.

Required
rightSourcesKeyValue<K,Vn>[]

One or more additional MultiJoin inputs. Their list order defines callback slots 1..N; value types may differ, but every key type K must match.

Required

Data Types properties

Message contracts visible at this node.

PropertyTypeDescription
valueTypeType

Output or response message contract. The exact meaning is operator-specific.

RequiredDefault: UnknownType

Function properties

Generated business-logic implementation and its placement.

PropertyTypeDescription
functionNamesymbol

Generated business-logic type or function name.

Required
functionPackagerelative path

Optional placement below the target-language functions root. Leave empty to use that root directly. A value such as folder/sub-folder is relative to the private or public functions root selected by publicFunction; nested-path handling is language-specific and is documented in Code Generation / Packages and Modules.

Default: empty (functions root)
publicFunctionboolean

Places the generated function in a shared package instead of the service-internal package.

Default: false
functionDescriptiontext

Documentation comment emitted with the generated function.

functionInitializerGroupstring

Dependency-injection initialization group for the generated function.

functionModuleModule

Shared module that owns the function.

Visible when publicFunction is true.

Execution properties

Pipeline placement and runtime policy.

PropertyTypeDescription
pipelinestring

Visual and configuration grouping inside the owning service.

ttlmilliseconds

Maximum configured lifetime of retained state for one key. 0 disables configured expiry. A message context deadline becomes the effective deadline for that key when present.

Default: 0Minimum: 0
renewTTLboolean

When the callback returns false, move the key back to active storage and renew its positive TTL after another value arrives.

Default: false

Position properties

Designer-only canvas coordinates.

PropertyTypeDescription
xPosnumber

Horizontal designer coordinate. It has no runtime effect.

Required
yPosnumber

Vertical designer coordinate. It has no runtime effect.

Required

Configuration example

type: MultiJoin
source: keyOrdersForMultiJoin
sources: [keyPaymentsForMultiJoin, keyShipmentsForMultiJoin]
joinStorage: HashMap
ttl: 60000
renewTTL: true
valueType: analyticsResult
functionName: MultiJoinAnalyticsEvents