Can now set $config['queue']['stomp_persistent'] = false; to explicitly disable persistence when we queue items
This commit is contained in:
parent
ffaaf9de4a
commit
a868a523a5
@ -84,6 +84,7 @@ $default =
|
|||||||
'control_channel' => '/topic/statusnet-control', // broadcasts to all queue daemons
|
'control_channel' => '/topic/statusnet-control', // broadcasts to all queue daemons
|
||||||
'stomp_username' => null,
|
'stomp_username' => null,
|
||||||
'stomp_password' => null,
|
'stomp_password' => null,
|
||||||
|
'stomp_persistent' => true, // keep items across queue server restart, if persistence is enabled
|
||||||
'monitor' => null, // URL to monitor ping endpoint (work in progress)
|
'monitor' => null, // URL to monitor ping endpoint (work in progress)
|
||||||
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
|
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
|
||||||
'debug_memory' => false, // true to spit memory usage to log
|
'debug_memory' => false, // true to spit memory usage to log
|
||||||
|
@ -174,12 +174,13 @@ class StompQueueManager extends QueueManager
|
|||||||
|
|
||||||
$this->_connect();
|
$this->_connect();
|
||||||
|
|
||||||
// XXX: serialize and send entire notice
|
$props = array('created' => common_sql_now());
|
||||||
|
if (common_config('queue', 'stomp_persistent')) {
|
||||||
|
$props['persistent'] = 'true';
|
||||||
|
}
|
||||||
$result = $this->con->send($this->queueName($queue),
|
$result = $this->con->send($this->queueName($queue),
|
||||||
$msg, // BODY of the message
|
$msg, // BODY of the message
|
||||||
array ('created' => common_sql_now(),
|
$props);
|
||||||
'persistent' => 'true'));
|
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log(LOG_ERR, "Error sending $rep to $queue queue");
|
common_log(LOG_ERR, "Error sending $rep to $queue queue");
|
||||||
|
Loading…
Reference in New Issue
Block a user