My problem concerns two services: NotificationService(should be used by more than just the SurveyService), SurveyService.
I want to send recurring notifications to the user asking for participation in a survey. These should be sent in a certain interval until the max notification number is reached or until the user participated in the survey.
Without the recurring part I would do it like this: The SurveyService dispatches an "UserAddedToSurvey" event which gets processed by the NotificationService which in response notifies the user.
But with recurring notifications I have to consider whether the user participated and when the last notification was send/how many were sent regarding this topic.
If I understand the idea behind microservices correctly is that they should not have any knowledge about each other. But I need information from both services to decide whether or not to inform the user again.
My only idea regarding this would be a cronjob in the SurveyService dispatching a UserStillNotParticipatedInSurvey event regularly and letting the NotificationService decide whether or not sending a notification based on the last notification date and the total number of notifications regarding this topic.
Would that be an appropriate solution? Or Are there any better/simpler ways of solving that problem?