# Migrating to Version 2

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: Migrating to Version 2
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: migration/v2
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: migration/v2.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/guides/pages/migration/v2.adoc
description: Learn how to migrate to Redpanda Connect v2.
page-git-created-date: "2024-05-24"
page-git-modified-date: "2024-09-05"
---

<!-- Source: https://docs.redpanda.com/connect/guides/migration/v2.md -->

Redpanda Connect version 2 comes with a small number of backwards incompatible changes that are organized into three sections; [configuration](#configuration), [service](#service) and [Go API](#go-api).

These changes are considered minor and therefore upgrading is not expected to cause significant problems for any users.

## [](#configuration)Configuration

### [](#type-inference)Type inference

Version 2 comes with the ability to infer the `type` of components in configuration files whenever the field is omitted. You can read more about this behavior [here](https://docs.redpanda.com/connect/configuration/about/#concise-configuration).

This feature is not expected to impact the vast majority of users. However, there is one exception where a malformed section containing unused type parameters but a missing `type` field will be interpreted differently. For example, the following config:

```yml
pipeline:
  processors:
  - # type: text
    text:
      operator: set
      value: "delete all your content"
```

In V1 would be interpreted as a `bounds_check` processor as it is the default processor type, whereas V2 would infer this to be a `text` processor based on its fields.

#### [](#migration-guide)Migration guide

Most users should not be impacted by this change, and a config file that is vulnerable to the regression would report linting errors in V1.

You can quickly verify that your configs are interpreted without regression by comparing the output of `benthos -c ./yourconfig.yaml --print-yaml` with V1 and V2. If they are the same then you are not affected.

### [](#field-default-value-changes)Field default value changes

In version 2 the field `unsubscribe_on_close` of the `nats_stream` input is now `false` by default.

## [](#service)Service

The recommended way to create plugins for Redpanda Connect is outlined in [this repository](https://github.com/benthosdev/benthos-plugin-example). Therefore the following experimental plugin related flags have been removed from the service: `swap-envs`, `plugins-dir`, `list-input-plugins`, `list-output-plugins`, `list-processor-plugins`, `list-condition-plugins`.

The flag `swap-envs` has also been removed for clarity, as it had no impact on JSON reference resolution. If this flag is being used please open an issue and it can be reimplemented to be fully compliant.

## [](#go-api)Go API

### [](#condition-package-moved)Condition package moved

The package `github.com/Jeffail/benthos/lib/processor/condition` has been changed to `github.com/Jeffail/benthos/lib/condition`. Migrating should be a simple case of applying a find/replace on your codebase:

```sh
find . -name "*.go" | \
  xargs sed -i 's/benthos\/lib\/processor\/condition/benthos\/lib\/condition/g'
```

### [](#interface-changes)Interface changes

The following interface changes have occurred to core Redpanda Connect components:

-   `types.Cache` now has `types.Closable` embedded.

-   `types.RateLimit` now has `types.Closable` embedded.

-   `types.Manager` has new method `GetPlugin`.

-   `log.Modular` has new method `WithFields`.