In microservices should i use pub/sub instead RPC to get more loosely couple architecture? : <p>I current using a RPC call to another microservice via TCP and getting the response, but I think I can do it in this way:</p>

<p>whithout make a RPC call, can I use a pub/sub to send to one service, publishing some channel like <em>request_user</em> and subscribed to a channel like  <em>object_user_response</em>, and then the other service that is subscribed to this <em>request_user</em>, publish <em>object_user_response</em>.</p>

<p>Like that:</p>

<pre><code>Service A &lt;-- (sub)object_user_response &lt;------  Redis
Service A --&gt; (pub)request_user -------------&gt;   Redis

Service B &lt;-- (sub)request_user &lt;--------------- Redis
Service B --&gt; (pub) object_user_response ------&gt; Redis
</code></pre>

<p>On receive a object_user_response, the service A checks if the id of user is the same that the function have requested. </p>

<p>Should I use RPC or Pub/sub for that?
What is the most correct way to send data to a microservice and get response from there in terms of loosely coupled architecture, is using a RPC call or using two pub/sub, on for the request and another for the response?  </p>
