Move DB requests to broker
Communication with MongoDB is moved to broker. Receiver makes request to broker to inject message metadata, stream_metadata and beamtime metadata. There are few ToDos left to keep this MR smaller. There are also some features, that was moved from receiver to broker. List below should help for review:
- Injection of broker message may failed with an error: ID already exists. Therefore it need to try again. This feature was more from receiver to broker with the same comment message. This may disappear after further refactoring.
- Authentication for communication between receiver and broker is not jet implemented. This is left for the next commit with corresponding ToDos in the code.
- Error handling need to be revised. Current communication (receiver to broker) is performed with ServiceRequest class. This works with Errors defined in the
ConsumerErrorTemplates
. This can be translated to proper Receiver errors. However I would suggest to performed it later after next steps of refactoring.
Edited by Mikhail Karnevskiy