pulsarwebsocketclient / pulsarclient
This is for pulsar websocket client
1.1.0
2021-11-18 07:07 UTC
Requires
- php: >=7.2
- predis/predis: ^1.1
- textalk/websocket: ^1.5
README
PHP Pulsar Client WebSocket
This Client Is For Php Queue Service
Now Just Contain pulsar and redis client
How To Use Pulsar Queue Service
use ZZQueueService\QueueService; $queueService = QueueService::getPulsarQueue([ "url" => "111.111.0.60:8080", "tenant"=>"socket", "namespace"=>"socket_namespace", "topic"=>"socket_topic" ]); $array = ["a"=>"b","c"=>"d"]; for ($i=0;$i<100;$i++) { $queueService->produceMessage($array); sleep(2); }
How To Use Redis Queue Service
$queueService = QueueService::getRedisQueue(["params"=>'tcp://192.168.33.30:6379',"qname"=>"test_redis_queue"]); $queueService->produceMessage("show me code"); $queueService->consumerMessage(function($msg){ print_r($msg); });