Posting a message in RabbitMQ is very easy, unfortunately RabbitMQ does not provide any feedback on the success or failure of the delivery in a queue. A simple typo in the routing key and the message will be lost forever without being informed. The Alternate Exchange option allows you to retrieves these "lost" messages in a specific queue. Read the post

Elastic provides a light weight PHP library: elasticsearch-php to connect to Elasticsearch cluster. This Library is an API client with all possible options. It's light weight and lets developer chose implementation to use it. It's a very good alternative to Elastica and his abstraction layer. On this blog I'm using elasticseach-php with Twig to manage my indices and query Elasticsearch. Read the post

I almost use only the command line to make calls on APIs using cURL. It's convenient and fast, easily scriptable if needed and the history of bash saves me time. But the response provided by cURL is not always readable especially when it comes to JSON. In this article I will introduce JQ that I use to display a pretty readable JSON and more. Read the post

Today, we use more and more external libraries in our projects. Though it saves us time, it is possible that we may introduce security vulnerabilities via these libraries. Controlling this is unfortunately not systematic, and particularly seldom automated. I'll show you in this post how to automate this control using SensioLabs' tool and Jenkins. Read the post

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

RabbitMQ is fast, sometimes a bit too much compared to the rest of the infrastructure. A database replication delay can crash the processing of a message. I show you how I handle this problem and use the dead letter exchange and dead letter routing key options to delay the processing of a message. Read the post

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

Most sites use cookies. Whether for tracking or persisting data, unfortunately good security practices are not always apply. In this article I will present the different options available in PHP and how to implement them with Symfony. Read the post