All posts about software development with PHP for backend and Javascript for frontend (page 2/2)

When I'm not writting code for my job, I do it for personal project and fun. I'm self-taught man, 20 years ago I read a lot of tech blogs to learn basics and advanced concepts. Now it's my turn to share my knowledge. Most of posts in this category is about programing with PHP using Symfony framework for backend using cool poject like RabbitMQ or Elasticsearch. I'm also writting a little about Javascript for frontend dev.

Control the number of retries of a message with x-death header in RabbitMQ

Sometimes the processing of a message causes an error. In this case, it is common to move this message to another queue to try to process it later. All this, can be automated in RabbitMQ with the DLX / DLK option and the application of a TTL. But be careful not to create an infinite loop of attempted treatment, in this article I will introduce x-death header to control the number of retries. Read the post

Manipulation of dates and times in PHP with the DateTime native class

Following the article on the manipulation of dates in SQL, I realized that, in fact, the manipulation of date in php was not so simple and known as that. There are many functions on dates in PHP and I still find a lot of code that gets confused trying to calculate dates with mktime, manipulating timestamps. While a very practical class exists: DateTime. So it is she, and her companions, that I will present. Read the post