Custom response to Device

Hello! I’m using Chirpstack V3 and I planning to migrate to V4 but I had customized the old version to intercep the response message when the device is connecting to server(after reboot or poweron). In the response message I add especific information to device to work correctly. In the custom code I get the ingormation data from database. My question is that:
V4 have an method to make it without changing the main Chirpstack code?

I’m thinking, I will need make an service to send the messages in intervals, but in my custom code I just send this message when the device need.

If you mean that you need to send downlinks in response to uplink messages, that is the role of the application server - which Chirpstack doesn’t really take the role of.
I would write an application that integrates with Chirpstack using one of its integration methods, to process and to respond to messages from the device.