Notification works with Message Broker directly
Notification will work with MQ through mapper/driver abstraction
This is a universal solution created using EPAM OQM mapper technology. It allows you to work with various implementations of message brokers.
In the current version, the mapper is equipped with several drivers to the message brokers:
- Google PubSub;
To use any other message broker, implement a driver for it. With an extensible set of drivers, the solution is unrestrictedly universal and portable without modification to the main code.
This service uses specific implementations of DestinationResolvers based on the tenant information provided by the OSDU Partition service. A total of 2 resolvers are implemented, which are divided into two groups:
- for RabbitMQ: mappers/oqm/MqTenantOqmDestinationResolver.java
- incoming Destination carries data-partition-id
- resolver accesses the Partition service and gets PartitionInfo
- from PartitionInfo resolver retrieves properties for the connection: URL, username, password etc.
- resolver creates a data source, connects to the resource, remembers the datasource
- resolver gives the datasource to the mapper in the Resolution object
- for PubSub: mappers/oqm/PsTenantOqmDestinationResolver.java
Except that they do not receive special properties from the Partition service for connection, because the location of the resources is unambiguously known - they are in the GCP project. And credentials are also not needed - access to data is made on behalf of the Google Identity SA under which the service itself is launched. Therefore, resolver takes only the value of the projectId property from PartitionInfo and uses it to connect to a resource in the corresponding GCP project.