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
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
- Create the Cloud Message Queue service instance for your preferred subscription plan.
- 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.
- Migrate from RabbitMQ to ActiveMQ.
- 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.
- 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
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
Migrate from RabbitMQ to ActiveMQ
About This Task
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.