summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-04-20 02:35:40 +1000
committerJames Turnbull <james@lovedthanlost.net>2011-04-20 02:35:40 +1000
commit7d3c30323efa5c2de2282395bc4105fef8b19e50 (patch)
treeaefea20994f90ab911812a082f04c7b41dbdbf96 /lib
parent97e9e5f223cb7baefd52456e2324c592fe415dca (diff)
downloadpuppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.tar.gz
puppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.tar.xz
puppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.zip
Fixed #7166 - Replaced deprecated stomp "send" method with "publish"
The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/indirector/queue.rb2
-rw-r--r--lib/puppet/util/queue.rb2
-rw-r--r--lib/puppet/util/queue/stomp.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/indirector/queue.rb b/lib/puppet/indirector/queue.rb
index fd089f431..85ffacacc 100644
--- a/lib/puppet/indirector/queue.rb
+++ b/lib/puppet/indirector/queue.rb
@@ -36,7 +36,7 @@ class Puppet::Indirector::Queue < Puppet::Indirector::Terminus
def save(request)
result = nil
benchmark :info, "Queued #{indirection.name} for #{request.key}" do
- result = client.send_message(queue, request.instance.render(:pson))
+ result = client.publish_message(queue, request.instance.render(:pson))
end
result
rescue => detail
diff --git a/lib/puppet/util/queue.rb b/lib/puppet/util/queue.rb
index 02357742a..636bdcf2e 100644
--- a/lib/puppet/util/queue.rb
+++ b/lib/puppet/util/queue.rb
@@ -30,7 +30,7 @@ require 'puppet/util/instance_loader'
#
# The client plugins are expected to implement an interface similar to that of Stomp::Client:
# * <tt>new</tt> should return a connected, ready-to-go client instance. Note that no arguments are passed in.
-# * <tt>send_message(queue, message)</tt> should send the _message_ to the specified _queue_.
+# * <tt>publish_message(queue, message)</tt> should publish the _message_ to the specified _queue_.
# * <tt>subscribe(queue)</tt> _block_ subscribes to _queue_ and executes _block_ upon receiving a message.
# * _queue_ names are simple names independent of the message broker or client library. No "/queue/" prefixes like in Stomp::Client.
module Puppet::Util::Queue
diff --git a/lib/puppet/util/queue/stomp.rb b/lib/puppet/util/queue/stomp.rb
index c18edae6a..cabc56627 100644
--- a/lib/puppet/util/queue/stomp.rb
+++ b/lib/puppet/util/queue/stomp.rb
@@ -28,8 +28,8 @@ class Puppet::Util::Queue::Stomp
end
end
- def send_message(target, msg)
- stomp_client.send(stompify_target(target), msg, :persistent => true)
+ def publish_message(target, msg)
+ stomp_client.publish(stompify_target(target), msg, :persistent => true)
end
def subscribe(target)