Handle case when device was removed from db but message in the queue (#4092)
* Remove device from cache in case null value cached in the distributed redis * Handle case when device was removed from db but message in the queue exists * Code review chagnes
This commit is contained in:
parent
dac7c5250f
commit
eaa2c5785f
@ -134,7 +134,8 @@ public class TbDeviceProfileNode implements TbNode {
|
|||||||
if (deviceState != null) {
|
if (deviceState != null) {
|
||||||
deviceState.process(ctx, msg);
|
deviceState.process(ctx, msg);
|
||||||
} else {
|
} else {
|
||||||
ctx.tellFailure(msg, new IllegalStateException("Device profile for device [" + deviceId + "] not found!"));
|
log.info("Device was not found! Most probably device [" + deviceId + "] has been removed from the database. Acknowledging msg.");
|
||||||
|
ctx.ack(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user