r58522 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58521‎ | r58522 | r58523 >
Date:10:06, 4 November 2009
Author:tomasz
Status:ok
Tags:
Comment:
adding configurable queue name
Modified paths:
  • /trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php
@@ -68,8 +68,9 @@
6969 */
7070 function sendSTOMP($transaction) {
7171 global $wgOut;
72 - global $wgStompServer;
 72+ global $wgStompServer, $wgStompQueueName;
7373
 74+ $queueName = isset ( $wgStompQueueName ) ? $wgStompQueueName : 'test';
7475 // include a library
7576 require_once("Stomp.php");
7677
@@ -82,7 +83,7 @@
8384 $con->connect();
8485
8586 // send a message to the queue
86 - $result = $con->send("/queue/test", $message, array('persistent' => 'true'));
 87+ $result = $con->send("/queue/$queueName", $message, array('persistent' => 'true'));
8788
8889 if (!$result) {
8990 wfDebugLog('activemq_stomp', 'Send to Q failed for this message: ' . $message);

Status & tagging log