Message Broker Configuration for Adaptor
YOUnite Adaptors communicate with the YOUnite API/Router using JMS through a Message Broker.
The properties covered below can be either specified in the application.properties
file for spring boot application or using the environment variables of the same name in Docker instance, via the docker command line or the docker-compose.yml
file.
To configure the adaptor instance to be able to communicate with the Message Broker, do the following steps:
- Message Broker URL: Specify the Message Broker URL using the property
activemq.broker.url
.
This URL is used to specify the host and port information for the Message Broker.
(TODO: move this information to another service that can be used to retrieve such dependencies) - SSL/TLS: YOUnite uses self-signed certificates for enabling SSL/TLS between the YOUnite API service and the YOUnite Adaptors. Since these certificates are being used only for enabling SSL/TLS encryption, nothing else needs to be done for enabling SSL/TLS.
- Adapter UUID: This ID uniquely identifies an adaptor in the YOUnite system and is assigned at the time an adaptor is created or posted. Specify the adaptor UUID using the property
younite.adaptor.uuid
. - OAuth Server URL: Specify the OAuth server URL using the property
oauth.authorization.server.url.
- OAuth Client Id: Specify OAuth client Id (may not be the same as the Adaptor Uuid), using the property
oauth.client.client-id
. - OAuth Client secret: Specify OAuth Client secret, using the property
oauth.client.client-secret.
For example:
activemq.broker.url=nio+ssl://docker.local:61617
oauth.authorization.server.url=http://localhost:8080
oauth2.client.client-id=074554bd-2ab7-4249-8267-8747459d82ab
oauth2.client.client-secret=66e2caa4-c656-4b94-9d44-dc0b90320b02
oauth2.client.grant-type=client_credentials
younite.adaptor.uuid=defaultUuid
Running the API server in an IDE and the rest of the stack using docker-compose
Please see the instructions at this page.