Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- 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);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement