Last updated Sep 5, 2024

Prepare your cloud app for Forge migration

This page explains how to prepare your cloud app for migration by processing events.

Events

The Forge function and trigger that you implement will allow the app migration platform to send information about about specific migration events that take place on your server app.

Add Forge function and trigger to the manifest

Define a function and trigger to process migration events.

See an example

1
2
modules:
  function:
    # Function to handle migration events
    - key: migration-fn-key
      handler: index.run
  trigger:
    # Migration events that will invoke your function
    - key: migration-trigger
      function: migration-fn-key
      events:
        - avi:ecosystem.migration:triggered:listener
        - avi:ecosystem.migration:uploaded:app_data

Our sample app provides a complete implementation.

Refer to the events API, for all the events that you can listen for and their associated payloads.

Processing events

When processing events it is important to keep in mind the following:

  • Event acknowledgement - you must call messageProcessed(transferId, messageId) for avi:ecosystem.migration:uploaded:app_data events within 15 minutes of receiving the event.
  • Events are not ordered - the platform may send events in a different order e.g. avi:ecosystem.migration:uploaded:app_data may appear before avi:ecosystem.migration:triggered:listener.
  • Validate the event payloads and throw an exception if validation fails - this will help you monitor for failed function invocations and failed function invocations will be retried.

Rate this page: