项目作者: OneGuardSolutions

项目描述 :
Front Controller for OneGuard Micro-Service Architecture
高级语言: Java
项目地址: git://github.com/OneGuardSolutions/msa-service-front-controller-old.git
创建时间: 2018-06-23T20:29:44Z
项目社区:https://github.com/OneGuardSolutions/msa-service-front-controller-old

开源协议:MIT License

下载


Front Controller for OneGuard Micro-Service Architecture

GitHub license
Maintainability

Micro-Service that acts as a front controller to allow client to consume
other services APIs.

Requirements:

  • JDK 9 or above
  • Maven
  • RabbitMQ server

How to run this example

First install RabbitMQ Server.
For purpose of this example we assume the server is running on local host and default port.

If your environment differs, override the configuration in src/main/resources/application-default.properties.
See src/main/resources/application.properties for id.

Clone this repository:

  1. git clone git@github.com:OneGuardSolutions/msa-service-front-controller.git

Start the app from the cloned directory:

  1. mvn spring-boot:run

Message format

The message MUST by json encoded.

  1. {
  2. "type": "echo.request",
  3. "payload": {},
  4. "occurredAt": 1514761200000,
  5. "id": "UUID"
  6. }
  • type string - message type used to determine handler
  • payload object - actual contents of the message processed by the handler,
    1. structure depends on the handler
  • occurredAt date optional - time of message occurrence in milliseconds since the epoch
    1. (1970-01-01 00:00:00.000); defaults to current time when received
  • id uuid optional - used by client to match any potential response to the request

Used libraries

Client libraries