add MessageQueue program from php to C