tcdl / msb

A framework to simplify the implementation of an event-bus oriented microservices architecture
MIT License
22 stars 7 forks source link

Expect not durable response queue #63

Open rkatsyuryna opened 8 years ago

rkatsyuryna commented 8 years ago

When microservice initiates a request to another microservice and Request_response pattern is used it creates durable response queue Expected: not durable response queue

There is no reason to use durable/autodelete=false response queue,

  1. we can config network of brokers into cluster so after broker restart we not loose responses. If we need of cource.
  2. if microservise that consume reponses restarts, it can't handle responses as list of expected messages by Collectors is cleared
jupiter commented 8 years ago

To my knowledge the default is non-durable. In which scenario is it creating durable response queues?

rkatsyuryna commented 8 years ago

i think this is more about : we should always create non-durable response queue. Configs should not change this option. Please

jupiter commented 8 years ago

I just checked, and it seems it is not currently possible to configure a Responder consumer as durable, see https://github.com/tcdl/msb/blob/master/lib/collector.js#L60. The only way you can do that is by creating a consumer with the durable flag. This is only done in a few select cases, such as in es-archiver https://github.com/tcdl/msb-es-archiver/blob/master/lib/logger.js#L33, but never that I recall for response queues.