https://github.com/doubaokun/metaq-php
MetaQ PHP client library
https://github.com/doubaokun/metaq-php
consumer metaq metaq-php php zookeeper
Last synced: 5 months ago
JSON representation
MetaQ PHP client library
- Host: GitHub
- URL: https://github.com/doubaokun/metaq-php
- Owner: doubaokun
- License: mit
- Created: 2013-09-04T15:08:35.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-09T02:20:21.000Z (over 12 years ago)
- Last Synced: 2024-08-05T04:08:06.888Z (almost 2 years ago)
- Topics: consumer, metaq, metaq-php, php, zookeeper
- Language: PHP
- Homepage: https://github.com/doubaokun/metaq-php
- Size: 122 KB
- Stars: 38
- Watchers: 5
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#MetaQ PHP Client library
* Support producer short connection and long connection, this require the config file
* Producer random select a broker-partition for load balance, no proxy required
* Support master async salve group cluster, circle backups
* Producer auto failover
* Consumer will read from both master and slaves
* Slave broker can be read by consumers
* Store consumer offset in zookeeper
* Consumer do not require the config file, they will fetch meta data from zookeeper
* Consumer will auto-rebalance if consumer group changes
* Suggest to use superviord auto restarting when consumer process dies. see http://supervisord.org/
##MetaQ server installation and configurations:
wget http://fnil.net/downloads/metaq-server-1.4.6.2.tar.gz
Web UI for MetaQ: http://ip:8120/
Web UI for zookeeper: https://github.com/qiuxiafei/zk-web.git
##Notes
### Remember to set
updateConsumerOffsets=false
### Master node configuration:
[system]
brokerId=0
numPartitions=1
serverPort=8123
dashboardHttpPort=8120
unflushThreshold=1000
unflushInterval=10000
maxSegmentSize=1073741824
maxTransferSize=1048576
deletePolicy=delete,168
deleteWhen=0 0 6,18 * * ?
flushTxLogAtCommit=1
stat=true
getProcessThreadCount=40
putProcessThreadCount=40
dataPath=/home/bruce/meta2
;; Update consumers offsets to current max offsets when consumers offsets are out of range of current broker's messages.
;; It must be false in production.But recommend to be true in development or test.
updateConsumerOffsets=false
[zookeeper]
zk.zkConnect=localhost:2181
zk.zkSessionTimeoutMs=30000
zk.zkConnectionTimeoutMs=30000
zk.zkSyncTimeMs=5000
;; Topics section
[topic=t1]
numPartitions=5
### Slave configuration:
slaveId=1
slaveGroup=meta-slave-group
slaveMaxDelayInMills=50
autoSyncMasterConfig=true
### Install PHP zookeeper extension:
1. Install libzookeeper
2. pecl install zookeeper-0.2.2