Front Controller for OneGuard Micro-Service Architecture
Micro-Service that acts as a front controller to allow client to consume
other services APIs.
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:
git clone git@github.com:OneGuardSolutions/msa-service-front-controller.git
Start the app from the cloned directory:
mvn spring-boot:run
The message MUST by json encoded.
{
"type": "echo.request",
"payload": {},
"occurredAt": 1514761200000,
"id": "UUID"
}
type
string
- message type used to determine handlerpayload
object
- actual contents of the message processed by the handler,
structure depends on the handler
occurredAt
date
optional - time of message occurrence in milliseconds since the epoch
(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