Tanu Gupta
Tanu Gupta

Reputation: 612

What if connection is not explicitly closed using php amqplib?

Suppose, in my php script, I have opened a connection to rabbitmq using php-amqplib client. And after publishing message, I dont explicitely close the channel and connection.

I dont see any timeout in rabbitmq config for connections. What happens to the connection? Does it remained open for no time?

Upvotes: 1

Views: 1414

Answers (1)

Luke Bakken
Luke Bakken

Reputation: 9667

When running PHP in a web server, all resources (not just those related to php-amqplib) are released at the end of an HTTP request. This includes any channels or connections.

Upvotes: 0

Related Questions