<div dir="ltr">Hi,<div><br></div><div>I bought the Rabbit In Action book. The authors said that you should not open a connection to Rabbit every single time you want to send a message. It seems logic when you know the channel mecanism however in a HTTP context with a server web, I don't see how you can do it. <span style="color: rgb(0, 0, 0); font-family: arial, sans-serif; white-space: nowrap;">Especially</span> in an Apache/PHP mod context. You can't share a connection between requests in PHP because each request has its own process and scope and don't share anything (or I don't know of any method to do it).</div><div><br></div><div>So suppose you must send a message through Rabbit each time a user make a GET request to your server, you will open a connection, create an exchange (maybe a queue too), send a message, close the connection. It will be time consumming and maybe overload rabbit. Is there another solution ? I am thinking about queueing my message in a simple SQL table (because I already open the connection to the server at each request) and process each line with a batch which will send the message to Rabbit but It seems like building another queue mecanism from scratch ....</div><div><br></div><div>Thanks in advance for your suggestion.</div><div><br></div><div>Best regards</div></div>