Commit eaa2c5785f3b5e72db1592511cf2fedc355067c4
Committed by
GitHub
1 parent
dac7c525
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
Showing
1 changed file
with
2 additions
and
1 deletions
@@ -134,7 +134,8 @@ public class TbDeviceProfileNode implements TbNode { | @@ -134,7 +134,8 @@ public class TbDeviceProfileNode implements TbNode { | ||
134 | if (deviceState != null) { | 134 | if (deviceState != null) { |
135 | deviceState.process(ctx, msg); | 135 | deviceState.process(ctx, msg); |
136 | } else { | 136 | } else { |
137 | - ctx.tellFailure(msg, new IllegalStateException("Device profile for device [" + deviceId + "] not found!")); | 137 | + log.info("Device was not found! Most probably device [" + deviceId + "] has been removed from the database. Acknowledging msg."); |
138 | + ctx.ack(msg); | ||
138 | } | 139 | } |
139 | } | 140 | } |
140 | } else { | 141 | } else { |