YOUnite uses Apache’s ActiveMQ Artemis as its message bus for communication between services in the YOUnite Data Fabric.

Introduction

image

The following services use the message bus to exchange messages:

Message Bus Queues

Queues are used to exchange messages between services with the following naming conventions:

  1. Names are of the form: <destination>-<type>[-<UUID>]

  2. Possible values for destination:

    1. RA = Message from a YOUnite service to an adaptor

    2. AR = Message from an adpator to a YOUnite service

    3. Notification = Message from the YOUnite Server to the YOUnite Notification Service

  3. Possible vlaues for type:

    1. Data = Data event

    2. Metadata = Metadata event

    3. Ops or Operations = Operational message

    4. Link = Linkage information about a data record

    5. Logs = Entry to be forwarded to central logging (Elastic)

    6. Registration = Registration (used to register or un-register for notifications)

    7. Assembly = Federated Data Record Assembly

  4. UUID that uniquely identifies the consumer, if required.

    1. If the destination is an adaptor, it will be the adaptor’s UUID.

    2. If the destination is the YOUnite Data Virtualization Service, it is the unique UUID of the server instance.

    3. If the destination is the YOUnite Server or YOUnite Notification Service, the UUID is left blank.

Security

Message bus queues are secured by username/password authorization. For the YOUnite services, the username/password is part of their application configuration (see the configuration guides of each service in the Knowledge Base).

Adaptors, on the other hand, are granted permission to the queues they need to access to as they are created. They authenticate with the message bus using the Client ID and Client Secret that are randomly generated upon creation.

Message Bus Configuration

The only configuration required for the message bus is the username and password of the administrator which are used by YOUnite’s services to communicate with the message bus. There is also an optional configuration option for extra arguments to pass to the JVM running the message bus.

Property Description Default Example

ARTEMIS_USER

AMQ admin username for console access

admin

artemis

ARTEMIS_PASSWORD

AMQ admin password

admin

artemis

JAVA_EXTRA_ARGS

Optional Java arguments to pass to AMQ - normally none should be required.

None

-Xms512m -Xmx512m

Example entry in a docker-compose.yml fil:

  younite-mb:
    image: <docker-repository>/younite/activemq-artemis:<version>
    container_name: younite-mb
    environment:
      - ARTEMIS_USER=<username>
      - ARTEMIS_PASSWORD=<password>
      - JAVA_EXTRA_ARGS=<optional JVM args>
    ports:
      - 61616:61616/tcp
      - 61613:61613/tcp
      - 8161:8161/tcp
    networks:
      - younite

Debugging

ActiveMQ Artemis comes with a console for monitoring and administration. This is normally exposed on port 8161 (ie http://localhost:8161) and can be accessed using the same username and password as configured above.

Message bus concurrency and Message Grouping