I tried diffrent design
now I tried domain-driven design
create a thread one time running to sent publish_get message to the IoT device,
because initially, if serviceA want the IoT device status,
but now the IoT device didn't send the topic(because IoT device would send the notification in interval)
in this case, you can use publish_get message to notify the IoT device to send the status immediately right now to the broker
create a thread all time running to receive the notification(status) of IoT device and save the status in database
create a thread one time running to get the status of the IoT device from the database
intergration of publish_get message and save the IoT device status into database
intergration get the IoT device status from database and update the status and send to the broker