> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.kafka.platform.NewMessage

- Component: `appmixer.kafka.platform.NewMessage`
- Kind: Trigger
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.kafka 1.2.7](https://connectors.appmixer.com/connector/appmixer.kafka/1.2.7.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.kafka/1.2.7/component/appmixer.kafka.platform.NewMessage>

Consume messages in a topic.

## Properties

| Field | Type | Description |
| --- | --- | --- |
| Group ID (`groupId`) | text | The group ID is a string that uniquely identifies the group of consumer processes to which a consumer belongs. |
| Topics (`topics`) | expression | Each topic can be added by "AND" button. If a topic starts with the / character, it is considered as a regular expression. |
| From Beginning (`fromBeginning`) | toggle | If set, the group will use the earliest offset. If not set, it will use the latest offset. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Key (`key`) | string | - |
| Value (`value`) | string | - |
| Headers (`headers`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.kafka.platform.NewMessage",
  "author": "David Durman <david@client.io>",
  "description": "Consume messages in a topic.",
  "private": false,
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:kafka"
  },
  "properties": {
    "schema": {
      "type": "object",
      "properties": {
        "groupId": {
          "type": "string"
        },
        "topics": {
          "type": "object"
        },
        "fromBeginning": {
          "type": "boolean"
        }
      },
      "required": [
        "topics",
        "groupId"
      ]
    },
    "inspector": {
      "inputs": {
        "groupId": {
          "type": "text",
          "label": "Group ID",
          "tooltip": "The group ID is a string that uniquely identifies the group of consumer processes to which a consumer belongs.",
          "index": 0
        },
        "topics": {
          "type": "expression",
          "label": "Topics",
          "levels": [
            "AND"
          ],
          "fields": {
            "topic": {
              "type": "text",
              "label": "Topic Name",
              "required": true,
              "index": 1,
              "tooltip": "Enter a topic to subscribe to."
            }
          },
          "index": 1,
          "tooltip": "Each topic can be added by \"AND\" button. If a topic starts with the / character, it is considered as a regular expression."
        },
        "fromBeginning": {
          "type": "toggle",
          "label": "From Beginning",
          "index": 2,
          "defaultValue": false,
          "tooltip": "If set, the group will use the earliest offset. If not set, it will use the latest offset."
        }
      }
    }
  },
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Key",
          "value": "key",
          "schema": {
            "type": "string",
            "examples": [
              "key1"
            ],
            "example": "order-1001"
          }
        },
        {
          "label": "Value",
          "value": "value",
          "schema": {
            "type": "string",
            "examples": [
              "Hello world"
            ],
            "example": "{\"orderId\":\"1001\",\"status\":\"created\"}"
          }
        },
        {
          "label": "Headers",
          "value": "headers",
          "schema": {
            "type": "object",
            "examples": [
              {
                "system-id": "my system"
              }
            ],
            "example": {
              "source": "orders-service"
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
