Migrating to Cloud Message Queue

About Migrating to Cloud Message Queue

Cloud Message Queue is designed to replace Predix Message Queue. The Predix Message Queue service will no longer be available in future and therefore, GE Digital recommends you migrate to the Cloud Message Queue service before the Predix Message Queue service is deprecated.

Migrate from Predix Message Queue to Cloud Message Queue

Before You Begin

  • Analyze and benchmark your workload to identify which Cloud Message Queue subscription plan is appropriate for your Cloud Foundry (CF) application. If you choose to subscribe to a High Availability (HA) plan, you must use the Failover Transport protocol. For more information on the Failover Transport protocol, refer to the ActiveMQ documentation.
  • Identify the protocol that is most suitable for your team. AmazonMQ supports Advanced Message Queuing Protocol (AMQP), Simple (or Streaming) Text Orientated Messaging Protocol (STOMP), OpenWire, WebSocket, and MQ Telemetry Transport (MQTT). However, you can choose a protocol based on your programming language.
  • Analyze whether persistent or non-persistent messaging is most suitable for your CF application.
  • Analyze whether the messages will be consumed by fast or slow consumers, and then based on that information, decide on the durability of the messages.

About This Task

This topic describes the steps that you must perform to migrate from Predix Message Queue to Cloud Message Queue.
Important: In case of connection failure during the migration, utilize the design patterns for auto-recovery and to avoid a deadlock or race condition.

Procedure

  1. Create the Cloud Message Queue service instance for your preferred subscription plan.
  2. Ensure that all messages that were scheduled to be delivered by the RabbitMQ broker have been delivered and processed according to the logic of your CF application.
  3. Migrate from RabbitMQ to ActiveMQ.
  4. Deploy the CF application using the Blue-Green deployment method to reduce application downtime and risk. For more information on Blue-Green deployment, refer to the Cloud Foundry documentation.
  5. Run your test cases to verify whether the CF application is correctly deployed, and then switch the route mapping.

Create Cloud Message Queue Service Instance

About This Task

You must create a new service instance for the Cloud Message Queue plan that you want to subscribe.
Important: In this topic, angle brackets (< >) indicate placeholder text. If such placeholder text is part of a command, you must replace it with an appropriate value before running the command.

Procedure

  1. Access the Cloud Foundry (CF) Command Line Interface.
  2. Run the following command to verify whether Cloud Message Queue is available in the CF marketplace of your organization:
    cf m
  3. Run the following command to access the list of Cloud Message Queue plans that are available in the CF marketplace for subscription:
    cf m -s cloud-message-queue
  4. Run the following command to create the service instance:
    cf create-service cloud-message-queue <subscription_plan_name> <instance_name>
  5. Wait for 15-20 minutes, and then run the following command to check the status of the service instance:
    cf service <instance_name>

Migrate from RabbitMQ to ActiveMQ

About This Task

Predix Message Queue uses RabbitMQ and Cloud Message Queue uses ActiveMQ as the underlying engine. Therefore, migrating from RabbitMQ to ActiveMQ is an important step while migrating from Predix Message Queue to Cloud Message Queue.

The ActiveMQ supports Advanced Message Queuing Protocol (AMQP) v1.0, whereas RabbitMQ supports AMQP v0.9.1. There are major differences between these protocols and because of these differences, you must make some modifications in the code to migrate from RabbitMQ to ActiveMQ.

Refer to the following documentation for more information on the modifications that you must make in the code:
Important: Ignore the procedure of creating the message broker that is provided in the AWS and Amazon MQ Workshop documentation. The procedure is not valid for Cloud Message Queue.