I have a scenario where I am sending a message to a request queue which in turns calls a lambda. That lambda performs some operation and write the data to a response queue(AWS SQS). How do I retrieve the specific message from my response queue for which request was sent and pass on that to the next step. Steps:
I have a Step function At step 1, I am sending the input data to a request queue ( say ABCQueue) This queue is trigger to a lambda The lambda processes, and writes data to response queue( say XYZQueue) In my step function next step is to receive the message from response queue
How do I maintain the sequence here i.e the data I sent that only should I receive from response queue?
Note: Since there would be multiple requests coming in and each request would be getting completed at different time. Is there any unique id by which I can check the id which I sent is only received back from response queue?
NOTE: I am integrating this with java
I have tried to use task token while using wait for callback. But that task token expires once I send success from lambda And when it goes to next state i.e. receive message the task token is not there and I can't get corresponding message