Messaging Service (MES)

The Messaging Service allows to set up a RabbitMQ server (v.3.1.5) for message exchange between system components. The service is similar to Amazon SQS.

The service is available in EPAM regions only.

Have a Question?

The current page gives the general information on the service and the main workflows. However, while working with the services, our users encounter new questions they need assistance with. The most frequently asked questions on EPAM Cloud Services are gathered on the Cloud Services FAQ page.
Visit the page to check whether we have a ready answer for your question.

Related CLI Commands

The table below provides the list of service-related commands and their descriptions:

Command Short Command Description
or2-manage-service... -s messaging or2ms Starts the service and creats a token for accessing the RabbitMQ server
or2-manage-queues or2mq Used to create and manage existing Rabbit queues
or2-manage-messages or2mm Used to send, receive and delete Rabbit messages

Further on this page, you can find more details on the Messaging Service manipulation.

Service Activation and Manipulation

EPAM Private Cloud provides a special entry point in the Messaging service that may be used for communication between AWS SDK and the service.

Please note that when working with the Messaging Service, Maestro CLI addresses the service API directly, omitting Orchestrator.

In both cases, to use the service, you need to create a token that will be used to reach the RabbitMQ server. The token is created by the or2-manage-service (or2ms) command with the --init-entry-point flag:

or2ms -p project -r region -s messaging --init-entry-point

For each project-region combination, there should be a special token created. The token is stored in the default.properties file, and has the following structure:

messaging.project.region.access=http://service_VM_DNS:5673#token
  • Activate the service using the or2ms command with -a -s messaging parameters:
or2ms -p project -r region -s messaging -a

On the service activation, Orchestrator launches a MEDIUM Ubuntu14.04_64-bit VM with RabbitMQ server on it.

A project can have only one Messaging service in each region.
  • Create a new queue with the or2-manage-queues (or2mq) command:
or2mq -p project -r region -a create -q queue_name [-v visibility_timeout]

Where "queue-name" specifies the name of the new queue and "visibility-timeout" sets the time, in seconds, after which the messages taken by the consumer get back to the queue. The default and the minimum value here is 30.

You can also use the or2mq command to clear the queue (-a purge), to view the information about queues (-a describe), or to remove an existing queue (-a delete).

  • Manage messages using the or2-manage-messsages (or2mm) command. To create a new message and send it to RabbitMQ, use the command with the -a send parameter:
or2mm -p project -r region -q queue_name -a send -m message_content

Where "message-content" is the content of the message to be sent, 256KB max. You can specify the "file" prefix to get the message from a specific file, e.g.: -m file:D:/message.txt.

  • To receive messages, use the or2mm command with the -a receive action:
or2mm -p project -r region -q queue_name -a receive -c messages_count -w wait_time

Where "messages_count" is the number of messages the consumer should take from the queue, and "wait_time" is the time the consumer waits for the messages. Only the messages coming during this time will be received.

  • To delete a message from the queue, use the or2mm command with -a delete action:
or2mm -p project -r region -q queue_name -a delete -i message_id

Service Token

EPAM Private Cloud provides a special entry point in the Messaging service that may be used for communication between AWS SDK and the service.

Please note that when working with the Messaging Service, Maestro CLI addresses the service API directly, omitting Orchestrator.

In both cases, to use the service, you need to create a token that will be used to reach the RabbitMQ server. The token is created by the or2-manage-service (or2ms) command with the --init-entry-point flag:

or2ms -p project -r region -s messaging --init-entry-point

For each project-region combination, there should be a special token created. The token is stored in the default.properties file, and has the following structure:

messaging.project.region.access=http://service_VM_DNS:5673#token

Web UI

The current implementation of the Messaging service does not include Web UI support.

Using the Service with AWS SDK

To work with Messaging service via AWS SDK, you should provide credentials that contain your username (name_surname in lower case) and token, generated by or2ms --init-entry-point command.

You should also provide endpoint as http://{service-host}:5673/amazon/.

The following actions are implemented:

  • createQueue()
  • createQueueWithAttributes()
  • listQueues()
  • listQueuesWithNamePrefix()
  • purgeQueue()
  • deleteQueue()
  • sendMessage()
  • sendMessageWithAttributes()

The other AWS SDK options are not supported by the Messaging service.

Pricing

The service usage price is defined by the price of the Rabibit VM.

The default parameters of the instance are:

  • Shape: MEDIUM
  • Image: Ubuntu14.04_64-bit

Therefore, the approximate monthly cost of one Messaging service instance in case of 100% and 24/7 load is about $58.59 in EPAM-BY1 region (as to 12/20/2014). The price can vary depending on the region.
To get more detailed estimations, please, use our Cost Estimator tool.

To estimate the price of the AWS-based infrastructure you plan to create, you can use the AWS Simply Monthly Calculator.

References

More information on the Messaging Service can be found in the EPAM Cloud Services Guide. For detailed description of the Maestro CLI commands used to manage the Messaging Service, refer to the Maestro CLI User Guide.