git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit ec504ec4 authored by mmn's avatar mmn

Merge branch 'nightly' of git.gnu.io:gnu/gnu-social into nightly

parents 96ce758c d9fbc17f
...@@ -324,7 +324,9 @@ class Stomp ...@@ -324,7 +324,9 @@ class Stomp
{ {
$headers = array('ack' => 'client'); $headers = array('ack' => 'client');
$headers['activemq.prefetchSize'] = $this->prefetchSize; $headers['activemq.prefetchSize'] = $this->prefetchSize;
if ($this->clientId != null) { $headers['prefetch-count'] = '1';
if ($this->clientId != null) {
$headers["activemq.subcriptionName"] = $this->clientId; $headers["activemq.subcriptionName"] = $this->clientId;
} }
if (isset($properties)) { if (isset($properties)) {
......
...@@ -151,7 +151,7 @@ class StompQueueManager extends QueueManager ...@@ -151,7 +151,7 @@ class StompQueueManager extends QueueManager
$envelope = array('site' => $siteNickname ? $siteNickname : common_config('site', 'nickname'), $envelope = array('site' => $siteNickname ? $siteNickname : common_config('site', 'nickname'),
'handler' => $queue, 'handler' => $queue,
'payload' => $this->encode($object)); 'payload' => $this->encode($object));
$msg = serialize($envelope); $msg = base64_encode(serialize($envelope));
$props = array('created' => common_sql_now()); $props = array('created' => common_sql_now());
if ($this->isPersistent($queue)) { if ($this->isPersistent($queue)) {
...@@ -479,7 +479,7 @@ class StompQueueManager extends QueueManager ...@@ -479,7 +479,7 @@ class StompQueueManager extends QueueManager
protected function handleItem($frame) protected function handleItem($frame)
{ {
$host = $this->cons[$this->defaultIdx]->getServer(); $host = $this->cons[$this->defaultIdx]->getServer();
$message = unserialize($frame->body); $message = unserialize(base64_decode($frame->body));
if ($message === false) { if ($message === false) {
$this->_log(LOG_ERR, "Can't unserialize frame: {$frame->body}"); $this->_log(LOG_ERR, "Can't unserialize frame: {$frame->body}");
...@@ -490,7 +490,7 @@ class StompQueueManager extends QueueManager ...@@ -490,7 +490,7 @@ class StompQueueManager extends QueueManager
$site = $message['site']; $site = $message['site'];
$queue = $message['handler']; $queue = $message['handler'];
if ($this->isDeadletter($frame, $message)) { if ($this->isDeadLetter($frame, $message)) {
$this->stats('deadletter', $queue); $this->stats('deadletter', $queue);
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment