summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-29 15:46:41 -0700
committerBrion Vibber <brion@pobox.com>2010-03-29 15:46:41 -0700
commitfaa14b64abb006422149562ba51e82820ed2aefa (patch)
tree4dac1096a712910216a03b337b38e8b09d89ce6a /lib
parentbd1363c17abf9686a6104fac7d62df3b044f87e9 (diff)
Tweak to Eugene Crosser's patch to make transactions and acks configurable; disabling them gets basic message delivery working under MorbidQ, and may help with RabbitMQ etc.
I swapped the settings from negative to positive ($config['queue']['stomp_transactions'] = false rather than $config['queue']['stomp_no_transactions'] = true), gave them defaults (both on for best ActiveMQ experience), and added notes to the README about configuring them.
Diffstat (limited to 'lib')
-rw-r--r--lib/default.php2
-rw-r--r--lib/stompqueuemanager.php14
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/default.php b/lib/default.php
index 7b0d08e4c..7d9a37174 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -88,6 +88,8 @@ $default =
'stomp_username' => null,
'stomp_password' => null,
'stomp_persistent' => true, // keep items across queue server restart, if persistence is enabled
+ 'stomp_transactions' => true, // use STOMP transactions to aid in detecting failures (supported by ActiveMQ, but not by all)
+ 'stomp_acks' => true, // send acknowledgements after successful processing (supported by ActiveMQ, but not by all)
'stomp_manual_failover' => true, // if multiple servers are listed, treat them as separate (enqueue on one randomly, listen on all)
'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
diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php
index 4d9f39791..5d5c7ccfb 100644
--- a/lib/stompqueuemanager.php
+++ b/lib/stompqueuemanager.php
@@ -60,13 +60,13 @@ class StompQueueManager extends QueueManager
} else {
$this->servers = array($server);
}
- $this->username = common_config('queue', 'stomp_username');
- $this->password = common_config('queue', 'stomp_password');
- $this->base = common_config('queue', 'queue_basename');
- $this->control = common_config('queue', 'control_channel');
- $this->breakout = common_config('queue', 'breakout');
- $this->useTransactions = !common_config('queue', 'stomp_no_transactions');
- $this->useAcks = !common_config('queue', 'stomp_no_acks');
+ $this->username = common_config('queue', 'stomp_username');
+ $this->password = common_config('queue', 'stomp_password');
+ $this->base = common_config('queue', 'queue_basename');
+ $this->control = common_config('queue', 'control_channel');
+ $this->breakout = common_config('queue', 'breakout');
+ $this->useTransactions = common_config('queue', 'stomp_transactions');
+ $this->useAcks = common_config('queue', 'stomp_acks');
}
/**