Hi , I have the following use case that I want to model using akka streams and I am new to akka streams so would like to know how/what is the best way to model it.
I have a kafka consumer which reads from one topic massages the message and sends it to a RESTful external service. This external restful service takes a token that needs to be sent with every message in the header. This token expires every roughly 24 hours. I was thinking of creating an FSM actor that will act as a Token Manager. It will be in Active state where it can send the current token on receiving say a GetToken message. Then every 24 hours it receives a scheduled event for FetchToken, then it will go into Fetching mode, where it will retrieve a new token from another service and in that state it should keep queuing the requests for GetToken. Now, how do i hook this actor (TokenManager) into my stream so that it can provide a token for every message from kafka but block the stream until it gets a new token when it expires. Or if there is another solution to what I am thinking instead of creating a separate actor. Thanks Mohnish. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.