Given two services A and B, with B handling an event from A (through a broker), consider the that you want to do some operations in A and need data in B to query data in A.
You could do an HTTP request to a rest endpoint in B, use the data and do whatever you wanted to in A. Well I’ve read around that services should be self contained, that is if you need data in A that is found in B, have a copy of that data in A.
Another option will be to apply an event in A that is handled in B, and have B send the data back to A through another event. In my perception, this breaks the DDD principle that a command should only be used to modify state.
What option (including any other not mentioned) do people usually use?