Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.34 KB

cookbook.md

File metadata and controls

32 lines (21 loc) · 1.34 KB

PHP Simple Queue Cookbook

Tips, recommendations and best practices for use this library.

📖 Guide


📄 Cookbook

  • If you are using docker, run consumer in an individual container. This will allow you to get away from blocking handling and speed up the application.

  • You can work with serialized objects, but it's better to avoid it.

    • First you load the queue with big data.
    • Secondly if you change the objects of your application, there is a risk of getting errors when processing messages (which were in the queue).
    • However, this is a recommendation, not a hard and fast prescription, use common sense.
  • If you are using jobs we recommend using job aliases instead of class namespace. Because in the case of a refactor class or namespace may change messages from the queue continue to be processed.

  • If you are using basic example from consume.php you need to watch closely behind leaks in php process. PHP is meant to die.