As per this principle, Microservices should be stateless, meaning that they should not maintain any client-specific state between requests.
For example, if a microservice handles a user’s shopping cart, it should not store any information about the user’s cart between requests, but should retrieve the cart information from a database each time it processes a request.
If I could give just one advice of my years of experience in designing Java services then I would say keep it stateless as long as possible. By not Managing state in your service, you will avoid a lot of problems which comes due to that and you can greatly benefit form things like Caching for performance improvement.