Roiocam commented on issue #1311:
URL: https://github.com/apache/pekko/issues/1311#issuecomment-2097377248

   `DeviceTerminated` only sends if the child actor is terminated, it will 
always match groups, i don't think there have any issue on there. Could you 
make a minimal reproduction?
   
   ```diff
         case trackMsg @ RequestTrackDevice(`groupId`, deviceId, replyTo) =>
           deviceIdToActor.get(deviceId) match {
             case Some(deviceActor) =>
               replyTo ! DeviceRegistered(deviceActor)
             case None =>
               context.log.info("Creating device actor for {}", 
trackMsg.deviceId)
               val deviceActor = context.spawn(Device(groupId, deviceId), 
s"device-$deviceId")
   +           context.watchWith(deviceActor, DeviceTerminated(deviceActor, 
groupId, deviceId))
               deviceIdToActor += deviceId -> deviceActor
               replyTo ! DeviceRegistered(deviceActor)
           }
           this
   
         case RequestTrackDevice(gId, _, _) =>
   +       context.log.warn2("Ignoring TrackDevice request for {}. This actor 
is responsible for {}.", gId, groupId)
           this
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to