# firePatterns

Fire patterns is an advanced configuration of a component that allows you to define when your component is ready to fire (ready to process input messages). Fire patterns can make the engine to hold input messages on components input ports until the pattern matches and then send the messages to the component in bulk. Fire patterns are defined as an array or a matrix. An example of fire patterns may look like this:

```
{
    "firePatterns": ['*', 1]
}
```

The fire pattern above is interpreted as follows: The component processes messages only if the first input port has zero or more messages waiting in the queue and at least one message waiting in the second input port queue. Another example can be a fire pattern:

```
{
    "firePatterns": [1, 1]
}
```

In this case, the component only processes messages if there is at least one message on each of its two input ports. A good example for this pattern is the Sum component:

![](/files/-LATDtrsqccOD-Js7SYR)

The *Sum* component expects messages on both of its input ports before it can produce a sum of its inputs.

The following table lists all the possible fire pattern symbols:

| Symbol | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| \*     | (*Any)* The input port must have zero or more messages in the queue.                                                                                                                                                                                                                                                                                                                                                                                               |
| 1      | (*Exists)* The input port must have at least one message in the queue.                                                                                                                                                                                                                                                                                                                                                                                             |
| 0      | (*Empty*) The input port must have no message in the queue.                                                                                                                                                                                                                                                                                                                                                                                                        |
| A      | (*All*) The input port must have at least one message from all the connected components in the queue. This is a synchronization pattern that lets you specify that the component must wait for all the connected components to send a message before it can start processing. A typical example is a "Multiple-to-Single" join component. This component must wait for all the LoadCSV components to send a message before it can produce an SQL-like join schema. |

Note that you can also define a set of fire patterns for a component, for example:

```
{
    "firePatterns": [
        ['*', 1],
        [1, 0]
    ]
}
```

When more fire patterns are used, there must be at least one fire pattern that matches before the component fires.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmixer.com/6.0/6.2/building-connectors/manifest/firepatterns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
