The main function of your microservice A, startService(), does a few different jobs, which is likely what contributes to it being more than the 10 lines of code that the book recommends. It does the job of continuously listening for messages received from other programs through the zeroMQ socket, and then it checks whether the data type was signup or login. If it was signup, your function then creates an entry in the database, and if it was login, it then checks the retrieved password of the entry that matches the email sent against the password sent, and returns whether they match or not. Some of these jobs could potentially be put into different functions I think.
The main function of your microservice A, startService(), does a few different jobs, which is likely what contributes to it being more than the 10 lines of code that the book recommends. It does the job of continuously listening for messages received from other programs through the zeroMQ socket, and then it checks whether the data type was signup or login. If it was signup, your function then creates an entry in the database, and if it was login, it then checks the retrieved password of the entry that matches the email sent against the password sent, and returns whether they match or not. Some of these jobs could potentially be put into different functions I think.