# Integrate with Camel

## Integrate with Camel Actions

### SendMessage

Sends a message to a Camel producer and returns a response if the target system has output. Event metadata fields applicable for this action are as follows:

{% tabs %}
{% tab title="Table" %}

| Field          | Definition                                         | Example    | Default |
| -------------- | -------------------------------------------------- | ---------- | ------- |
| Domain         | System name to use as target                       | mq         | -       |
| Input Element  | Json path for the input in request event payload   | parameters | -       |
| Output Element | Json path for the output in response event payload | result     | -       |
| {% endtab %}   |                                                    |            |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Integrate with Camel SendMessage action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "System name to use as target",
          "example": "mq",
          "default": null
        },
        "inputElement": {
          "type": "string",
          "definition": "Json path for the input in request event payload",
          "example": "parameters",
          "default": null
        },
        "outputElement": {
          "type": "string",
          "definition": "Json path for the output in response event payload",
          "example": "result",
          "default": null
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

With event metadata parameters as:

{% tabs %}
{% tab title="Table" %}

| Parameter    | Definition                          | Example | Default |
| ------------ | ----------------------------------- | ------- | ------- |
| Exchange     | Camel message exchange pattern      | InOut   | -       |
| Camel Header | Header parameters to send to target | ...     | -       |
| {% endtab %} |                                     |         |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Integrate with Camel SendMessage action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "exchange": {
              "type": "string",
              "definition": "Camel message exchange pattern",
              "example": "InOut",
              "default": null
            },
            "camelHeader": {
              "type": "object",
              "definition": "Header parameters to send to target, represents camelHeader.*",
              "example": {
                "myHeader": "value"
              },
              "default": null
            }
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}
