Fix for endless loop when an exception of type EntityAlreadyExistsException is thrown in the context of the retryable findOrRegisterTargetIfItDoesNotExist method (#828)
* fixed typo in method name Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * Added recover method to handle EntityAlreadyExistsException Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * Added tests Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * Apply suggestions from code review Use thenThrow(Exception.class) instead of (new Exception()) Co-Authored-By: a-sayyed <ahmed.sayed@bosch-si.com> * Apply suggestions from code review use final modifier Co-Authored-By: a-sayyed <ahmed.sayed@bosch-si.com> * Adapted review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * Adapted review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * added logs for EntityAlreadyExistsException case Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
ed95ae6398
commit
9884452ad4
@@ -188,7 +188,7 @@ public class AmqpMessageHandlerService extends BaseAmqpService {
|
||||
}
|
||||
|
||||
final URI amqpUri = IpUtil.createAmqpUri(virtualHost, replyTo);
|
||||
final Target target = controllerManagement.findOrRegisterTargetIfItDoesNotexist(thingId, amqpUri);
|
||||
final Target target = controllerManagement.findOrRegisterTargetIfItDoesNotExist(thingId, amqpUri);
|
||||
LOG.debug("Target {} reported online state.", thingId);
|
||||
|
||||
lookIfUpdateAvailable(target);
|
||||
|
||||
Reference in New Issue
Block a user