]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Can now set $config['queue']['stomp_persistent'] = false; to explicitly disable persi...
authorBrion Vibber <brion@pobox.com>
Thu, 28 Jan 2010 17:52:35 +0000 (09:52 -0800)
committerBrion Vibber <brion@pobox.com>
Thu, 28 Jan 2010 17:52:35 +0000 (09:52 -0800)
lib/default.php
lib/stompqueuemanager.php

index c729193b52b366bfa6bf2e891a842d49fc3a6665..8de8b1097780e10214a3f1f540f3534693f92357 100644 (file)
@@ -84,6 +84,7 @@ $default =
               'control_channel' => '/topic/statusnet-control', // broadcasts to all queue daemons
               'stomp_username' => 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)
               '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
index da70d9ae31e70296cc046b512c23d0aebab7f033..4e2b58602514b9259c114503e2a054a85adcebe5 100644 (file)
@@ -174,12 +174,13 @@ class StompQueueManager extends QueueManager
 
         $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),
                                    $msg,               // BODY of the message
-                                   array ('created' => common_sql_now(),
-                                          'persistent' => 'true'));
+                                   $props);
 
         if (!$result) {
             common_log(LOG_ERR, "Error sending $rep to $queue queue");