dead_letter_dir: for stomp, optional directory to dump data on failed
queue processing events after discarding them.
+stomp_no_transactions: for stomp, the server does not support transactions,
+ so do not try to user them. This is needed for http://www.morbidq.com/.
+
+stomp_no_acks: for stomp, the server does not support acknowledgements.
+ so do not try to user them. This is needed for http://www.morbidq.com/.
+
license
-------
protected $base;
protected $control;
- protected $useTransactions = true;
+ protected $useTransactions;
+ protected $useAcks;
protected $sites = array();
protected $subscriptions = array();
$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');
}
/**
protected function ack($idx, $frame)
{
- if ($this->useTransactions) {
- if (empty($this->transaction[$idx])) {
- throw new Exception("Tried to ack but not in a transaction");
+ if ($this->useAcks) {
+ if ($this->useTransactions) {
+ if (empty($this->transaction[$idx])) {
+ throw new Exception("Tried to ack but not in a transaction");
+ }
+ $this->cons[$idx]->ack($frame, $this->transaction[$idx]);
+ } else {
+ $this->cons[$idx]->ack($frame);
}
- $this->cons[$idx]->ack($frame, $this->transaction[$idx]);
- } else {
- $this->cons[$idx]->ack($frame);
}
}