'Reply to Consumed Messages in Redis Stream

I'm working with Java and Redis.

I have service A and Service B. Service A produced the messages and Service B consume those messages and do some processing. I want to reply to the same message which is send by the Service A. Service A need to get decision based on the response.

What is the best way to achieve this (request/response architecture) using the redis streams ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source