Migrating applications from legacy Fabric SDKs to the Fabric Gateway

Teams moving client applications off the legacy Node, Java or Go SDKs need a planned rewrite, not a find-and-replace. This page covers what maps, which documented paths to use, and what drives effort.

On this page

Why a Fabric Gateway migration starts with the application, not the network

The rewrite is a client-side change, and its effort depends on how many connection, identity and event paths each application uses. An application built on the legacy Node, Java or Go SDK can be moved to the Fabric Gateway client API on its own schedule, while the network stays where it is. That separation is the main planning decision. Before estimating anything, inventory each application: which channels and chaincodes it calls, how it builds its peer connections, where it stores identities, and how it listens for chaincode and block events. Each of those paths needs a replacement design, and the more of them an application has, the more testing it needs.

The Fabric Gateway client API has been tested with Fabric v2.5 and v3, and the Fabric upgrade documentation states that client applications can be upgraded separately from the network. That means a team can migrate its applications while the network remains on v2.5, then upgrade the network later without rewriting clients a second time. Confirm this against the exact Fabric version your peers run and the Gateway client version your application will pin, because the compatibility statement covers the tested versions, not every combination. Also confirm which peers the Gateway will reach, since the client connects to a single endpoint in the network.

Start with a short list of questions for each application: which SDK version it uses, whether it reads connection profiles or wallet files, whether it relies on the SDK to choose endorsing peers, and how its event listeners recover after a dropped connection. Answers to those questions decide the order of work and the test cases. Applications that already manage their own gRPC connections and retry logic will move faster than those that depend on SDK defaults, and those SDK defaults are the behavior you must document before you remove them.

What maps cleanly from the legacy SDKs to the Fabric Gateway

This table compares the main concerns in a legacy SDK application with their Fabric Gateway equivalents and marks where your application still carries the work. Read it as a checklist: rows marked as moved to the Gateway can be deleted from your code, while rows where the application still owns the work need design time in the rewrite.

ConcernLegacy SDK approachFabric Gateway approach
Network addressingApplication lists peers and orderers by name and address in a connection profileApplication connects to a single Gateway endpoint in the network
Connection profilesRequired to describe peers, orderers, CAs and TLS roots for the clientNot needed; remove the profile and move its settings into application configuration
WalletsStores enrolled identities and keys that the SDK loads at runtimeNot needed as a wallet; confirm in the migration guide how your stack supplies signing identities and keys
Endorsement targetingApplication or SDK selects which peers and organizations must endorse each transactionEndorsement requirements generally need not be specified; confirm any exceptions for your channel policies
gRPC connectionsSDK creates and manages connections to peers behind the scenesApplication manages gRPC connections and their lifecycle, including startup and shutdown
Contract event listenersSDK listener resumes or reconnects automatically on most failuresApplication controls event reconnect and must track block position itself
Language clientsNode, Java and Go SDKs each carry their own connection and wallet modelGateway client APIs are available for Go, Node and Java, with the same connection model across them
Upgrade couplingClient code often has to move in step with the network releaseGateway client API is tested with Fabric v2.5 and v3, so applications can upgrade separately from the network

How the Fabric Gateway replaces connection profiles and wallets

A legacy Fabric SDK application starts by loading a connection profile, a file that lists the peers and orderers it may contact, their TLS certificates and the organization's MSP details. It then loads an enrolled identity from a wallet, a local store holding the certificate and private key. The SDK uses the profile to discover peers, works out which peers must endorse each transaction from the channel's endorsement policy, and manages the peer connections and event listeners itself. With the Fabric Gateway, the application connects to a single gateway endpoint in the network and the client API handles endorsement, submission and commit status through that endpoint. The connection profile and wallet are no longer the center of the design, so the migration removes code that built and read them.

The application team now owns decisions that the legacy SDK made silently. The first is the gRPC connection lifecycle: whether the application keeps one long-lived client connection per process, how it reconnects after a failure and how it shuts the connection down cleanly. The second is certificate and key file handling. Your application will read the client certificate, private key and peer TLS root certificate from files or a secrets store, so you must decide who issues them, how they are rotated and which service account can read them. The third is TLS settings, including the expected server name for the gateway endpoint and the trust roots used to verify it. Also decide where identity material lives in production, since a wallet directory on a developer machine rarely meets the controls a regulated team needs.

Each of these choices changes what your security review must cover, so record them before writing code. Confirm with your network operator which gateway endpoint your organization will use, which Fabric version it runs and which identity types your MSP issues, because these determine the client settings. For exact configuration keys, file layouts and code samples, follow the Fabric Gateway migration guide rather than adapting settings from an old profile. Test the connection, endorsement and event reconnect paths against a non-production network first, and log which identity submitted each transaction so the audit trail survives the move.

Documented paths the migration should use

Three official resources cover most of the migration work: client API setup, the differences from the legacy SDKs, and how client upgrades relate to network upgrades. Read them in that order, then use them as the reference for every application you move off the legacy Node, Java or Go SDKs.

Gateway client API getting started

This guide shows how to set up the Fabric Gateway client API in Go, Node and Java. Your team uses it to build the first working connection to a single network endpoint, submit a test transaction and read state back. Start with one non-production channel and one chaincode so the gRPC connection, identity loading and transaction path are proven before you port business logic. Confirm the current language package versions in the repository before you write any code, because client library releases move independently of the network.

Gateway getting started

Gateway migration guide

This guide lists where the Fabric Gateway client API differs from the legacy SDKs. Use it as a checklist to map each legacy concept to its replacement: connection profiles and wallets are no longer needed, endorsement requirements generally need not be specified, and the application now manages gRPC connections and event reconnection itself. Review each existing connection profile and wallet loader in your code and record what it did, so nothing it handled is silently dropped. Confirm the current language package versions in the repository before coding.

Migration guide

Component upgrade sequencing

This guidance explains how client applications relate to network upgrades. The Gateway client API has been tested with Fabric v2.5 and v3, so an application can move to the new client without waiting for a network upgrade, and the reverse also applies. Use it to plan two separate change windows, one for the client and one for the network, and to decide which side moves first in each environment. Record the tested network version for each client release in your change log, and confirm the current language package versions in the repository before coding.

Upgrading your components

Event reconnection ownership

Legacy SDKs handled event listener reconnection for the application, while the Gateway model hands that responsibility to your code. Decide where checkpointing of the last processed block lives, how a dropped stream resumes without skipping or duplicating transactions, and who is alerted when reconnection fails repeatedly. Test this path with a forced network interruption in a staging environment before cutover. Confirm the exact event API behavior in the Gateway getting started and migration documentation for your language.

How a transaction flows through the Fabric Gateway

The diagram starts in the client application, which opens a gRPC connection to a single Fabric Gateway endpoint instead of loading a connection profile and wallet. The gateway coordinates endorsement across peers, hands the endorsed transaction to ordering, and returns the commit status. The application owns the event reconnect loop, shown at the bottom, so check that it resumes from a saved block or transaction position after any dropped stream rather than assuming the gateway does it.

Transaction path through the Fabric Gateway, with the application-side event reconnect loop.

Migration sequence from inventory to decommissioning legacy SDK code

This sequence moves each client application from the legacy Node, Java or Go SDKs to the Fabric Gateway client API in an order that keeps the ledger safe at every stage. It ends with legacy code and wallets removed, and with evidence that each application behaves the same on the Gateway as it did before.

  1. Inventory every legacy SDK call site

    Your developers and the DeployOpen team list each application, service and script that imports a legacy SDK, then record every call site with its connection profile, wallet and identity, the chaincode functions it invokes or queries, the endorsing peers it names, and every event listener it registers. Owners of each application confirm the list. The inventory is done when every call site maps to an owner, an identity and a channel, and any unknown usage has been traced or explicitly accepted as out of scope.

  2. Select a low-risk pilot application

    Choose one application that submits a small set of well-understood transactions, has a clear business owner and can be run against a non-production channel without affecting live processes. Avoid applications that drive settlement or regulatory reporting for the first move. Before the pilot starts, the team writes success criteria covering transaction outcomes, event delivery, reconnect behavior and error handling, and agrees who signs off. The pilot is selected when those criteria are approved in writing.

  3. Build the Gateway version beside the legacy version

    Developers write the Gateway client alongside the legacy code in the same repository, using the Fabric Gateway client API for the language in use. The application manages its own gRPC connections, so the team sets connection, timeout and TLS configuration explicitly, and drops the connection profile and wallet dependencies for the Gateway path. The build is complete in a non-production environment when the Gateway version compiles, connects to the test network and runs each invoke and query from the inventory.

  4. Run both versions in parallel with reconciliation

    Both versions submit equivalent transactions against the same channel in a controlled window, with the same inputs, and the team compares results. Reconciliation checks that each submitted transaction has a matching outcome, that committed ledger state agrees, that events arrive once and in order after a forced disconnect, and that error codes match. Parallel running and reconciliation are the checks that matter most in this sequence, because they are the only evidence that the Gateway path behaves like the legacy path under real load and failure. Differences are logged and resolved before any cutover.

  5. Cut over each application with a documented rollback

    The application owner approves a cutover runbook that names the switch, the verification steps against the success criteria, and the rollback procedure with the exact steps to return to the legacy build. The team switches traffic to the Gateway version and watches submissions, event consumers and error rates against the criteria. The cutover is closed when the owner signs off that the success criteria held and the rollback path was tested in a non-production environment before the switch.

  6. Repeat cutover for remaining applications

    The team applies the same inventory, build, parallel run and cutover steps to each remaining application, starting with lower-risk services and leaving the most critical flows last. Lessons from the pilot update the runbook template and the success criteria. Each application has its own sign-off record. This phase is complete when every call site in the inventory is either migrated or formally scheduled with an owner and a decision date.

  7. Decommission legacy SDK code and wallets

    After a stable observation period agreed with the owners, the team removes legacy SDK dependencies, connection profiles, wallet directories and the identity material used only by the old clients, and revokes or retires those identities through your CA process. Access to remove the old secrets is logged. The step is done when the build no longer references a legacy SDK, a search of configuration and secret stores finds no orphaned wallets, and the decommission record is filed with the inventory.

Choosing the Gateway client path by application language

Applications built on the legacy Node SDK usually load a connection profile, read identities from a wallet and let the gateway object choose endorsing peers. With the Fabric Gateway client API for Node, the application creates and owns a gRPC connection to the single Gateway endpoint and supplies signing identity directly to the client. Much of the logic that the legacy SDK handled behind the scenes now sits in your code, so the migration includes rebuilding the connection lifecycle.

  • Connection setup: Your code creates the gRPC connection to the Gateway endpoint at startup and keeps it open for the life of the process. Confirm the exact constructor and option names in the Node section of the Gateway client API documentation.
  • Identity: Certificates and private keys are read from files or a secret store instead of a wallet directory. Wallet import steps can be removed from deployment scripts, but the identity material still needs a rotation plan.
  • Endorsement: For most transactions you no longer list endorsing organizations or peers. Review any code that passes explicit endorsement targets and confirm the behavior with your chaincode team.
  • Event reconnect: Block and chaincode event listeners do not restart on their own. Your code must record the last block processed, reconnect with backoff and resume without skipping or duplicating events.

Test first: submit and evaluate round trips for read and write transactions, then a forced disconnect during event streaming. Check the Node getting started guide in the Fabric Gateway client API documentation before you settle on package names and method signatures.

What drives the effort and duration of the SDK rewrite

The table lists the factors that change how much work a move from the legacy SDKs to the Fabric Gateway client API involves, the direction each one pushes cost, and what to ask for in a quote. Use it to see which factors apply to your estate before requesting a fixed-scope proposal. The main takeaway is that an agreed inventory of applications and transaction paths does more to firm up a quote than any single technical factor.

DriverWhy it changes effortWhat to ask for in a quote
Number of applications and transaction pathsEach application and each distinct submit, evaluate or commit path is a separate rewrite and test target. Shared libraries reduce repeated work but still need review.A written inventory listing each application, its owner, and every transaction path it calls, with the scope stated per path
Private data and event listenersPrivate data reads and writes, and event listeners that must resume after a disconnect, need explicit handling in the new client. Missed or duplicated events are a common source of rework.Confirmation of which collections and event streams are in scope, and how checkpointing and replay are tested
Custom endorsement or retry logicLegacy code often sets endorsing peers, discovery options or retry behavior by hand. Gateway handles much of this, so custom logic must be reviewed case by case, and some may be removed while some must stay.A list of every custom endorsement, retry and timeout setting in the current code, with a decision on keep or remove for each
Number of identities and certificate sourcesWallets, enrollment certificates from Fabric CA or other issuers, and TLS roots each need a new loading path. More sources mean more configuration and more verification.A table of identities per application, the issuing CA for each, and how keys are stored and rotated
Test coverageThin existing tests make it harder to prove that transaction results, read results and event handling match the legacy behavior. Adding tests raises effort but lowers risk at cutover.A description of the test suites that will be ported, the new tests planned, and the environment used to run them
In-house skills in Go, Node or JavaTeams fluent in the target language move faster. Teams without that skill need time to learn the client API or rely on a partner, which changes the split of work.A statement of which languages each team uses, and whether the partner or the internal team owns code review
Fabric network version and upgrade timingThe Gateway client API has been tested with v2.5 and v3, so client work can proceed on its own schedule. Coordinating client cutover with a network upgrade adds sequencing work.A decision on whether the client rewrite and any network upgrade run in one window or in separate windows

What usually goes wrong during the SDK cutover

Most SDK cutovers fail in the seams between old and new code rather than in the new client itself. The cards below cover the risks that tend to surface during a parallel run, and each one names the check that should catch it before traffic moves to the Fabric Gateway client.

Event loss or duplication after reconnect

With the legacy SDKs, reconnect and event replay were handled inside the SDK. With the Fabric Gateway, your application owns the event stream, so a dropped gRPC connection can silently skip blocks or replay them. Record the last processed block number durably, in the same transaction as the business write it triggers. During the parallel run, kill the connection on purpose and confirm that each business record appears exactly once in the target system.

Migration guide

Identities that work only in test

Test networks often use enrollment material copied from a development wallet or certificates issued by a test tool. Those identities can pass every check in staging and then fail in production because the MSP, certificate chain or TLS trust roots differ. Verify each production client identity against the production MSP before cutover, and confirm that the application loads its key and certificate from your secret store, not from a file in the image.

Forgotten legacy call sites in batch jobs

Web services usually get migrated first, while nightly reconciliation jobs, report generators and one-off scripts keep importing the old SDK. Those paths may not run during the parallel window, so failures appear weeks later. Inventory every process that imports the legacy Node, Java or Go SDK, including scheduled jobs and admin tools, and run each one once against the new client in the parallel environment before the old dependency is removed.

Endorsement assumptions that no longer hold

Legacy code often hard-codes which organizations must endorse a transaction, or builds endorsement logic around specific peers. The Fabric Gateway generally does not need those details specified, so the cutover can change which peers receive proposals and how failures surface. Compare endorsement outcomes for the same transactions on both paths, and confirm that error handling for endorsement failures still distinguishes business rejections from infrastructure errors.

Client and network upgrades ordered wrongly

The Fabric upgrade docs state that the Gateway client API is compatible with both v2.5 and v3.0, so client applications can move separately from the network. Teams still sequence the two together, or upgrade a client against a network version it was never tested with. Record the network version and the client library version for each environment, and agree which one moves first in writing. Confirm the client version against the current release notes before each change window.

Upgrading components docs

Missing rollback paths

Once writes go through the new client, reverting can mean replaying transactions or reconciling two systems that disagree. Teams often remove the legacy dependency before they have proven they can return to it. Keep the legacy code path deployable and switchable by configuration until the parallel run has passed its agreed exit criteria, and rehearse the switch back in a non-production environment with the same traffic pattern.

Questions teams ask before moving off the legacy Fabric SDKs

How much does migrating off the legacy Fabric SDKs cost?

The cost depends on how many client applications you have, how much each one does with the network, and how much testing and cutover work sits around them. Each application is a separate rewrite of its connection, identity and transaction code, so the count and complexity of applications drive most of the effort. Some costs are one-time, such as rewriting code, building test coverage and cutover. Others recur, such as maintaining the new client code and running it against new network versions. Ask any partner, including DeployOpen, for a written scope that lists each application, its languages, its event handling and its test environments. A quote follows from that scope, and DeployOpen does not publish a price list.

How long does a migration to the Fabric Gateway take?

Duration is set by the number of applications, how much each one depends on SDK-specific behavior, and how quickly your team can provide test channels and access. Applications that only submit transactions and query state are usually simpler than those that listen for chaincode events and must recover from dropped streams. Plan for time to inventory existing code, time to rewrite and test each application, and time for parallel running and cutover. The Fabric Gateway migration guide explains the conceptual changes, but it does not replace the engineering time needed to apply them. Ask for a schedule in the written scope that ties each application to a test and cutover milestone.

What does the work need from our internal team?

The work needs application owners who can explain what each client does and which business outcomes depend on it. It also needs a test channel or test network where rewritten applications can submit and query transactions without touching production data. Identity access is essential: the team must be able to provide the certificate and private key material that each application uses, and to approve which identities may invoke which chaincode. Expect the operations team to help with gateway peer endpoints, TLS certificates and monitoring. Agree on these inputs before the scope is signed, because waiting on test channels or identities is one of the most common causes of delay.

Can our own team do the migration without a partner?

Yes, if your developers have experience with Go, Node or Java and with Fabric's transaction flow. The migration guide and the Fabric Gateway client API getting started material are the starting point for mapping connection profiles and wallets to the new model. Teams that do it alone usually struggle with event reconnection, error handling for endorsement and commit outcomes, and testing under network faults. A partner can take on the inventory, rewrite, test and handover work, or review the work your team produces. Whichever route you choose, write down the acceptance tests for each application before you start coding.

Can the Fabric Gateway work with a network still on v2.5?

Yes. The Fabric Gateway client API has been tested with Fabric v2.5 and v3, so applications can move to the gateway while the network stays on v2.5. This matters because v2.5 is the long-term support line for production users, and the network upgrade to v3 can be planned on its own schedule. Confirm the exact client library version and the peer version you run in your test environment before cutover, since compatibility is a statement about tested combinations, not a promise about every release.

How does this migration relate to a later move to v3.x?

The gateway migration and the v3.x upgrade are separate tracks, and the Fabric upgrade documentation says client applications can be upgraded separately from the network. Doing the gateway migration first reduces the amount of change you must test during the network upgrade. The v3.x upgrade still has its own prerequisites, including moving off Kafka ordering and the legacy chaincode lifecycle, and those are network changes that the client migration does not remove. Plan both tracks in one roadmap so that application owners know which network behavior they are testing against at each stage.

What goes wrong most often during this migration?

The most common problems are unhandled event stream failures, incorrect assumptions about when a transaction is final, and identity material that was copied from a wallet without checking its permissions. Applications that were written against the legacy SDK's automatic behavior may not reconnect to events after a peer restarts, and they may not record block numbers that let them resume safely. Test these cases directly by stopping peers during load, rotating certificates and replaying events. Confirm each behavior in your own environment rather than assuming the new client handles it for you.

How DeployOpen works on this

DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and treats SDK migration the same way. We start from an inventory of the client applications that use the legacy Node, Java or Go SDKs, then rewrite them against the Fabric Gateway client API in a controlled sequence that your team can review at each step.

How we scope

  • Inventory every client application, its SDK version, connection profile, wallet location and event listeners.
  • Record which transactions need endorsement policy handling, private data access or chaincode events during migration.
  • Agree the scope in writing before work starts, with deliverables and timelines confirmed for each application.

How we build

  • Rewrite connection, identity and transaction code for the Fabric Gateway in your existing development workflow.
  • Test each application against the Fabric network version you run, including event reconnection and failed endorsement paths.
  • Run side-by-side verification against a non-production channel before any cutover to production traffic.

How we hand over

  • Deliver the migrated source, a per-application migration record and configuration notes for your engineers.
  • Document the gRPC connection lifecycle, identity handling and event reconnect logic so your team can maintain it.
  • Walk your engineers through the test results and open items before the engagement closes.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, if your team wants it.
  • Retest client applications when the network moves between Fabric releases, since SDK applications can be upgraded separately.
  • Confirm with your team which support hours, response expectations and escalation paths apply before signing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.