Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
namespace KutnyLib\RabbitMq;
use PhpAmqpLib\Connection\AbstractConnection;
class AmqpChannelFactory
private $connection;
public function __construct(
AbstractConnection $connection
) {
$this->connection = $connection;
public function createChannelFromPid()
$channelId = getmypid() % 65535;
return $this->connection->channel($channelId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment