DEV Community

Discussion on: Never underestimate the power of best practice

Collapse
 
danderson profile image
Dale Anderson

I don't understand this article. Which best practices are you talking about? Why would you make an invalid message visible to other receivers after a lock timeout? Can you explain a little better?

Collapse
 
ana profile image
Ana Chiritescu

All good questions, thanks! I understand that this post might be difficult to digest. The first part is a walk through on a use case inspired from real life where an invalid message was published to a processing queue (why? due to a bug in the developer's code) and caused continuous looping between the queue and the listener of that queue.

The best practices I highlighted in a subtle manner are:

Hope this clarifies it.

Collapse
 
danderson profile image
Dale Anderson

Cool, that does help my understanding. It's worth keeping in mind that you can't rely on message validation before it is published to the queue (think malicious user!), so having the receiver perform validation to pass any invalid messages to a dead letter queue is essential.

Keep up the writing!

Thread Thread
 
ana profile image
Ana Chiritescu

Excellent, glad to hear! Thanks, will do! :)