Skip to main content
added 1 character in body
Source Link
bobek
  • 272
  • 1
  • 9

Few thoughts.

Split the producer and the consumer. If you ever have issues in consumer and it's the same as producer you will not be accepting the files from users. The goal of MQs is to decouple the services not couple them together.

The producer should not be aware of the Queue itsit's pushing the messages to. It should push to an exchange with a routing key. The consumer, when starting up, should create a queue for itself (or do nothing if it exists) and bind it to the producer's exchange with the routing key required. This way, you can create a new consumer in the future without the need to change (and deploy) the producer.

Few thoughts.

Split the producer and the consumer. If you ever have issues in consumer and it's the same as producer you will not be accepting the files from users. The goal of MQs is to decouple the services not couple them together.

The producer should not be aware of the Queue its pushing the messages to. It should push to an exchange with a routing key. The consumer, when starting up, should create a queue for itself (or do nothing if it exists) and bind it to the producer's exchange with the routing key required. This way, you can create a new consumer in the future without the need to change (and deploy) the producer.

Few thoughts.

Split the producer and the consumer. If you ever have issues in consumer and it's the same as producer you will not be accepting the files from users. The goal of MQs is to decouple the services not couple them together.

The producer should not be aware of the Queue it's pushing the messages to. It should push to an exchange with a routing key. The consumer, when starting up, should create a queue for itself (or do nothing if it exists) and bind it to the producer's exchange with the routing key required. This way, you can create a new consumer in the future without the need to change (and deploy) the producer.

Source Link
bobek
  • 272
  • 1
  • 9

Few thoughts.

Split the producer and the consumer. If you ever have issues in consumer and it's the same as producer you will not be accepting the files from users. The goal of MQs is to decouple the services not couple them together.

The producer should not be aware of the Queue its pushing the messages to. It should push to an exchange with a routing key. The consumer, when starting up, should create a queue for itself (or do nothing if it exists) and bind it to the producer's exchange with the routing key required. This way, you can create a new consumer in the future without the need to change (and deploy) the producer.