The YOUnite API server (API), YOUnite Adaptors, and YOUnite UI communicate with each other using JMS. JMS messages are sent via the message broker.
Use the following steps to configure the JMS communication:
- Update the docker-compose files so that
ACTIVE_MQ_
URIURI
uses the SSL connector as follows:ACTIVE_MQ_URI=nio+ssl://openmdm-amq:61617
* If
If you are running the API outside of Docker, then update the properties file (application.properties)
to use the above mentioned uri for the property calledactivemq.broker.uri
. property using the above mentioned uri - Add the broker certificate to the trust store for the API as follows:
keytool -
import
-alias broker -keystore client.ts -file broker_cert
Since the only purpose of this certificate is to support SSL/TLS, we are not using a certificate signed by a CA. - Update the
ENTRYPOINT
in the Dockerfile to include the path to the trustStore as follows:-Djavax.net.ssl.trustStore=/opt/certs/client.ts
If you are running the API outside of Docker, then update add the above to the command line to include the path to the trustStore as mentioned above.
Naming convention for message Queues and Topics
- Names are of the form: <producer><consumer>-<Type>-<Id>Letter [UUID]
- Producers and consumers can be either adaptor or producer:
- The letter 'A' is used to denote Adaptor
- The letter 'R' is used for Router
- Type can be either:
- Data: For sending messages of type data or errors that are related to the data exchange
- Ops: For sending operational messages like State information.
- Id UUID is used to identify the consumer of the messages, and is left blank if there is only a single instance of the consumer as in case of router. For example, if the consumer is
adaptor
, then the Uuid UUID for that adaptor is used for the Id. For a topic that may have multiple consumers the Id UUID field is used to specify the scope or zone subtree that consumers may belong to. Topics intended for all use the Id of "root".
For example:
RA-Ops-root
: Topic for communicating operational messages, for which the producer is
Router - the router and consumers are all the
Adaptors - adaptors in the subtree below root (which is the entire tree)
RA-Data-
Uuid- UUID: Queue for communicating data and data related errors from
Router to Adaptor which is uniquely identified using the Uuid- the router to an adaptor uniquely identified by its UUID.
AR-Data
: Queue for communicating data and data related errors from
Adaptor - an adaptor to
Router- the router.
AR-Ops
: Queue for communicating operational messages from
Adaptor - and adaptor to
Router- the router.