Andrii Landiak 8faa1410b6
Edge crud notification: implement event publisher strategy to process pubsub model for detecting changes in entities
* Improve edge notification for entities' CRUD operations. Use service layer to notify instead of TbService

* Improve queue service, delete unused class for edge event updates

* Improve alarm delete and add handle fox delete dao event notification

* Refactoring: provide notification for relations and alarms. Improve logic and bad edge event type using

* Add entity type to SaveEvent to process correct message type to edge

* Improve relation service publish event

* Introduce EdgeEventSourcing service instead of saving edge events on controller/service layers. Part #2

* Improved stability of device edge test

* Push credential updated event only in case update

* Add tenantId to saveUser signature to send correct notification for listener

* Fix tests to send correct notification msg to edge

* Fix tests with correct action type

* Add delete msg to edge for customer

* Refactor ActionEntityEvent to use lombok builder

* Remove unnecessary comments

* Added edgeSynchronizationManager into BaseAlarmProcessor and BaseRelationProcessor

* Fixed license header

* Remove notification to edge from Version Control Service

* Fixed alarm del processing - find related edges inside edge processor

* Fix controller test for publish event to listener if entity was deleted

* Added check for edge imitator messages during login as tenant admin

* Refactoring: Added filtering of relation on EdgeEventSourcingListener

* Refactored to be in sync with PE

* Refactored edge test to be in sync with PE edge test changes

* EdgeControllerTest - moved await block into separate method to reuse it

* Fixed EdgeControllerTest

* Fixed testAssignEdgeToCustomerFromDifferentTenant test

* testSyncEdge - make stable

* Refacroting - update utils method name to pop* in EdgeControllerTest

* testSyncEdge - fixed order and nubmer of edge events

* testGetEdgeEvents - check by pop items, and not by index to improve stability on slow machines

* testGetEdgeEvents - added check that list is empty

* Removed test debug output

* EntityServiceTest - Fixed compilation error after merge

* Improve service layer event publisher to process each notification and validate in listener

* Improve BaseAlarmService to send notification to listener

* Fix asset-device notification action to send delete to all edges

* Delete unnecessary usage of sendMsgToEdge

* Improve processEntityNotification to be in sync with changed needed for PE

* Pull request review - minor refactoring

* Fix tests after review-refactoring

* Refactor tests to be in sync with PE

* Fixed repeated update - added check for old_edge_event table existance before migration

* DeviceEdgeProcessor - do edgeSynchronizationManager as soon as possible to avoid unnecessary downlinks

* BaseEdgeProcessor - refactoring and remove duplicate methods. Introduce EdgeEventType.isAllEdgesRelated

* Organize imports

* Improve Edge test: add sync completed message to await

* Minor refactoring for EdgeProcessor notification: asset and device

* EdgeEventSourcingListener - updated logging to avoid null pointer exception

* BaseAlarmService - added check for alarm to avoid NPE. EdgeEventSourcingListener - added try/catch blocks

* EdgeEventSourcingListener - fixed error message log level

---------

Co-authored-by: Volodymyr Babak <volodymyr.babak@gmail.com>
2023-08-07 13:21:02 +03:00
..
2023-06-23 18:58:32 +03:00
2023-06-28 13:48:46 +03:00
2023-05-22 16:32:24 +03:00
2023-05-22 16:32:24 +03:00
2023-07-31 13:51:03 +03:00
2023-08-01 14:56:50 +03:00
2023-05-22 16:32:24 +03:00
2023-06-13 17:18:32 +03:00
2023-05-22 16:32:24 +03:00