WIP tmp
This commit is contained in:
45
scripts/stomp-test.php
Normal file
45
scripts/stomp-test.php
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
//require 'vendor/autoload.php';
|
||||
require("../config/config.php");
|
||||
|
||||
define('FRONKDB_SQLDEBUG',false);
|
||||
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
||||
|
||||
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
||||
|
||||
use Stomp\Client;
|
||||
use Stomp\Network\Connection;
|
||||
use Stomp\StatefulStomp;
|
||||
use Stomp\Transport\Message;
|
||||
|
||||
|
||||
$me = new User(1);
|
||||
|
||||
$api_token = "E665AA3B0D8363D2A965B39A0CE28A100B16FE7D4505EF59FA2A1014A6D69967";
|
||||
$api_user = "api_rml03_ob";
|
||||
$api_pass = "7ktbho1s";
|
||||
|
||||
$queue = "test";
|
||||
|
||||
try {
|
||||
//$stomp_connection = new Connection("ssl://outboundqueue.d-test.rimo-saas.com:443");
|
||||
$stomp_connection = new Connection("tcp://localhost:61613");
|
||||
$stomp_client = new Client($stomp_connection);
|
||||
|
||||
$stomp_client->setLogin("api_rml03_ob", "7ktbho1s");
|
||||
$stomp = new StatefulStomp($stomp_client);
|
||||
|
||||
|
||||
|
||||
} catch (Exception $ex) {
|
||||
die("Exception: ".$ex->getCode()." Message: :".$ex->getMessage()."\n");
|
||||
}
|
||||
|
||||
$stomp->subscribe($queue);
|
||||
$frame = $stomp->readFrame();
|
||||
|
||||
print_r($frame);
|
||||
Reference in New Issue
Block a user