> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quixa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect / Barrier Join Node

> Synchronize parallel asynchronous branches with fork-join concurrency, barrier joins, and aggregated payload outputs.

In complex enterprise workflows, sequential execution of independent API calls introduces unnecessary latency. The **Collect / Barrier Join Node** (`component-collect`) enables high-throughput **Fork-Join Parallelism** on the visual canvas.

```mermaid theme={null}
flowchart LR
    Start["Verify Identity"] --> Branch1["Branch 1: Fraud & AML Check"]
    Start --> Branch2["Branch 2: Credit Limit Verification"]
    Start --> Branch3["Branch 3: Sanctions & Blacklist Check"]

    Branch1 --> Barrier["Collect (Barrier Join)"]
    Branch2 --> Barrier
    Branch3 --> Barrier

    Barrier --> Final["Approve & Disburse Loan"]

    style Barrier fill:#7c3aed,stroke:#a78bfa,stroke-width:2px,color:#fff
```

***

## 1. How Fork-Join Works in Quixa

### 1. Multi-Branch Fan-Out (Fork)

When multiple outgoing connection wires are drawn from a single node, Quixa executes those downstream branches concurrently across asynchronous worker threads.

### 2. Multi-Branch Fan-In (Barrier Join)

Wiring all concurrent branches into a **Collect Node** establishes a synchronization barrier:

* The Collect node halts downstream execution until **all incoming branches have finished**.
* If any branch fails, configurable error handling policies dictate whether to halt or proceed with partial results.

***

## 2. Aggregated Output Structure

The Collect node aggregates the responses, status codes, and execution metadata of all incoming branches into a unified JSON object accessible via **Response Binding**:

```json theme={null}
{
  "totalBranches": 3,
  "successfulBranches": 3,
  "durationMs": 412,
  "results": {
    "FraudCheck": {
      "statusCode": 200,
      "riskScore": 12,
      "recommendation": "PASS"
    },
    "CreditLimit": {
      "statusCode": 200,
      "availableBalance": 50000,
      "currency": "EUR"
    },
    "SanctionsList": {
      "statusCode": 200,
      "flagged": false
    }
  }
}
```

### Accessing Aggregated Values Downstream

Subsequent nodes can consume any branch output using dot notation:

```handlebars theme={null}
{{ResponseBinding.CollectNode.body.results.FraudCheck.riskScore}}
{{ResponseBinding.CollectNode.body.results.CreditLimit.availableBalance}}
```

***

## 3. Configuration Properties

| Property | Default | Description |
| :- | :- | :- |
| **Join Strategy** | `Wait All` | `Wait All` (all branches must complete) or `Wait Any` (first completed branch resumes flow). |
| **Timeout (ms)** | `30000` | Maximum time to wait for all branches to reach the barrier. |
| **Fail-Fast** | `true` | When true, immediately fails the barrier if any branch encounters an unhandled error. |
| **Emit Partial Results** | `false` | When enabled, proceeds with whatever branch outputs are available upon timeout. |

***

## 4. Enterprise Use Cases

* **Concurrent Risk Verification**: Running Fraud Detection, Account Balance, and Compliance Verification simultaneously after customer identification, reducing transaction latency by over 60%.
* **Parallel Notification Dispatch**: Fanning out to SMS, Email, and Push Notification microservices simultaneously before concluding a transaction flow.
* **Multi-Service Catalog Gathering**: Fetching product details, real-time warehouse inventory, and personalized user discounts concurrently before assembling the final checkout payload.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.