You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/09/11 21:18:54 UTC

qpid-proton git commit: PROTON-1584: ruby: remove examples for deprecated Messenger API

Repository: qpid-proton
Updated Branches:
  refs/heads/master 5e1bce7a0 -> 6888ab5e5


PROTON-1584: ruby: remove examples for deprecated Messenger API


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/6888ab5e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/6888ab5e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/6888ab5e

Branch: refs/heads/master
Commit: 6888ab5e5ee2ea79c3c9acae3a542e166a3e1954
Parents: 5e1bce7
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Sep 11 16:53:20 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Sep 11 17:17:40 2017 -0400

----------------------------------------------------------------------
 examples/ruby/messenger/README.md               | 163 -------------------
 examples/ruby/messenger/client.rb               |  92 -----------
 examples/ruby/messenger/mailserver.rb           |  84 ----------
 examples/ruby/messenger/nonblocking_recv.rb     | 145 -----------------
 examples/ruby/messenger/recv.rb                 |  82 ----------
 examples/ruby/messenger/send.rb                 |  74 ---------
 .../bindings/ruby/lib/messenger/messenger.rb    |   5 +-
 7 files changed, 4 insertions(+), 641 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/README.md
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/README.md b/examples/ruby/messenger/README.md
deleted file mode 100644
index 7cc8dee..0000000
--- a/examples/ruby/messenger/README.md
+++ /dev/null
@@ -1,163 +0,0 @@
-## Simple Messenger Examples
-
-The Messenger APIs, contained in the Qpid::Proton::Messenger class, represent the simplest means for sending and receive messages. An application need only create an instance of Messenger to have an endpoint for sending and receiving messages.
-
-Example applications, currently located in the messenger subdirectory, include:
-
-* **send.rb** - Sends one or more messages to a specific address.
-* **recv.rb** - Listens for messages sent to one or more addresses.
-
-### Sending A Simple Message Directly (Without A Broker)
-
-The goal of this example is to demonstrate how to send and receive messages directly between applications. To do that we've broken out the examples into two applciations: **send.rb** and **recv.rb**.
-
-First we need to start the receiver who will listen for an incoming connection:
-
-```
- $ ruby recv.rb ~0.0.0.0:8888
-```
-
-**NOTE:** Be sure to include the **tilda (~)** at the beginning of each address to be used. This tells the Messenger that it's going to be listening for connections on that port. And be sure to pick a free port for each of the addresses used.
-
-Now you can send messages with:
-
-```
- $ ruby send.rb -a 0.0.0.0:8888 "Hello world"
-```
-
-**NOTE:** Here you *don't* use a **tilda (~)** at the beginning of the address since you're specifying the receiver address rather than the address on which to listen.
-
-On the receiver side you should see something like:
-
-```
-Address: 0.0.0.0:8888
-Subject: How are you?
-Body: This is a test.
-Properties: {"sent"=>1432651492, "hostname"=>"mcpierce-laptop"}
-Instructions: {"fold"=>"yes", "spindle"=>"no", "mutilate"=>"no"}
-Annotations: {"version"=>1.0, "pill"=>"RED"}
-
-```
-
-This tells us the message we received as expected.
-
-### Sending A Simple Message Through A Broker
-
-To send a message via an intermediary, such as the Qpid broker, we need to give both the sender and the receiver a little bit more information, such as the hostname and port for the broker and the name of the queue where messages will be sent and received.
-
-If you're using the Qpid broker, this can be done using the **qpid-config**
-tool. Simply start your broker and then create our queue, which we'll call "examples":
-
-```
- $ qpid-config add queue examples
-```
-
-As of this point you can begin sending messages *without* starting the receiver. This is the benefit of using a broker, the ability to have something store messages for retrieval.
-
-Now let's send a bunch of messages to the queue using **send.rb**:
-
-```
- $ for which in $(seq 1 10); do ruby send.rb --address amqp://localhost/examples "This is test ${which}."; done
-```
-
-This example sends 10 messages to the our queue on the broker, where they will stay until retrieved.
-
-With this scenario we needed to specify the hostname of the broker and also the name of the queue in the address. After the sending completes you can verify the content of the queue using the **qpid-stat** command:
-
-```
-$ qpid-stat -q
-Queues
-  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
-  =========================================================================================================================
-  examples                                                        10    10      0    2.65k  2.65k       0         0     1
-  fa4b8acb-03b6-4cff-9277-eeb2efe3c88a:0.0       Y        Y        0     0      0       0      0        0         1     2
-```
-
-Now to retrieve the messages. Start the **recv.rb** example using:
-
-```
-$ ruby recv.rb "amqp://127.0.0.1:5672/examples"
-```
-
-Once it connects to the broker, it will subscribe to the queue and begin receiving messages. You should see something like the following:
-
-```
-Address: amqp://localhost/examples
-Subject: How are you?
-Body: This is test 1.
-Properties: {"sent"=>1432837902, "hostname"=>"mcpierce-laptop"}
-Instructions: {"fold"=>"yes", "spindle"=>"no", "mutilate"=>"no"}
-Annotations: {"version"=>1.0, "pill"=>"RED"}
-Address: amqp://localhost/examples
-Subject: How are you?
-Body: This is test 2.
-Properties: {"sent"=>1432837903, "hostname"=>"mcpierce-laptop"}
-Instructions: {"fold"=>"yes", "spindle"=>"no", "mutilate"=>"no"}
-Annotations: {"version"=>1.0, "pill"=>"RED"}
-Address: amqp://localhost/examples
-Subject: How are you?
-Body: This is test 3.
-... truncating the remainder of the output ...
-```
-
-As with the sending, we specific the protocol to use and the address and port on the host to connect to the broker.
-
-##  Non-Blocking Receive With The Messenger APIs
-
-One of the downsides of Messenger is that, out of the box, it's a blocking set of APIs; i.e., when attempting to receive messages the Ruby VM is halted until the call returns.
-
-Enter **non-blocking mode**!
-
-When working in non-blocking mode you set a flag on your messenger to put it into non-blocking mode.
-
-```
-messenger = Qpid::Proton::Messenger.new
-messenger.passive = true
-```
-
-At this point the application is responsible for monitoring the set of file descriptors associated with those Messengers. It takes a little more code but the benefit is that the application can spawn this in a separate thread and not have the entire VM block during I/O operations. The **nonblocking_recv.rb** example app demonstrates how to perform this properly, how to wrap the file descriptor in a Selectable type, monitor it for when there's data to send or receive and then work with the instance of Messenger.
-
-For more details on how to do this, take a look at the comments in the example application.
-
-
-### Running The Non-Blocking Receiver
-
-To start the non-blocking receiver, simply start the example application like this:
-
-```
- $ ruby nonblocking_recv.rb ~0.0.0.0:8888
- This is a side thread:
-The time is now 11:39:24.
-The time is now 11:39:25.
-The time is now 11:39:26.
-```
-
-As the receiver runs it outputs the current time every second to show that a separate thread is running.
-
-Now you can launch the **client.rb** example to send a message to the receiver and then wait for a reply:
-
-```
- $ ruby client.rb -r "~/#" 0.0.0.0:8888 "This is a test." "Here is my message."
- amqp://c19f3e88-866a-46ae-8284-d229acf8a5cb/#, RE: This is a test.
-```
-
-As you see, in the command line we specify "~/#" as the address to which any reply should be sent. It's outside of the scope of this example, but the tilda (~) is expanded into a unique address by Proton and used for receiving any responses.
-
-On the receiver side you should see something like this:
-
-```
-The time is now 11:42:04.
-The time is now 11:42:05.
-The time is now 11:42:06.
-Address: 0.0.0.0:8888
-Subject: This is a test.
-Body:
-Properties: {}
-Instructions: {}
-Annotations: {}
-=== Sending a reply to amqp://c19f3e88-866a-46ae-8284-d229acf8a5cb/#
-The time is now 11:42:07.
-The time is now 11:42:08.
-```
-
-Notice in the receiver's output how the reply was sent to the address on the sender that was created by our specifying "~/#"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/client.rb
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/client.rb b/examples/ruby/messenger/client.rb
deleted file mode 100644
index a2c2564..0000000
--- a/examples/ruby/messenger/client.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'qpid_proton'
-require 'optparse'
-
-
-$options  = {
-  :verbose => false,
-  :hostname => "0.0.0.0",
-  :subject => "",
-  :replyto => "~/replies"
-}
-
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: client [options] <addr> <subject>"
-
-  opts.on("-r", "--reply-to", String, :REQUIRED,
-          "Reply address") do |replyto|
-    $options[:replyto] = replyto
-  end
-
-  opts.on("-v", "--verbose", :NONE,
-          "Enable verbose output") do
-    $options[:verbose] = true
-  end
-
-  opts.on("-h", "--help", :NONE,
-          "Show this help message") do
-    puts opts
-    exit
-  end
-
-  begin
-    ARGV << "-h" if ARGV.empty?
-    opts.parse!(ARGV)
-  rescue OptionParser::ParseError => error
-    STDERR.puts error.message, "\n", opts
-    exit 1
-  end
-
-  ($options[:address], $options[:subject]) = ARGV
-
-  abort "No address specified" if $options[:hostname].nil?
-  abort "No subject specified" if $options[:subject].nil?
-
-end
-
-def log(text)
-  printf "#{Time.new}: #{text}\n" if $options[:verbose]
-end
-
-msgr = Qpid::Proton::Messenger::Messenger.new
-msgr.start
-
-msg = Qpid::Proton::Message.new
-msg.address = $options[:address]
-msg.subject = $options[:subject]
-msg.reply_to = $options[:replyto]
-
-msgr.put(msg)
-msgr.send
-
-if $options[:replyto].start_with? "~/"
-  msgr.receive(1)
-  begin
-    msgr.get(msg)
-    puts "#{msg.address}, #{msg.subject}"
-  rescue error
-    puts error
-  end
-end
-
-msgr.stop

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/mailserver.rb
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/mailserver.rb b/examples/ruby/messenger/mailserver.rb
deleted file mode 100644
index 594a0e3..0000000
--- a/examples/ruby/messenger/mailserver.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'qpid_proton'
-require 'optparse'
-
-FAILED         = 0
-CONNECTION_UP  = 1
-AUTHENTICATING = 2
-
-$options  = {
-  :verbose => false,
-  :address => ["amqp://~0.0.0.0"],
-}
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: mailserver [options] <addr_1> ... <addr_n>"
-
-  opts.on("-v", "--verbose", :NONE,
-          "Print status messages to stdout") do |f|
-    $options[:verbose] = true
-  end
-
-  opts.parse!
-
-  if ARGV.length > 0
-    $options[:address] = []
-    ARGV.each {|address| $options[:address] << address}
-  end
-end
-
-def log(text)
-  STDOUT.puts "#{Time.new}: #{text}" if $options[:verbose]
-end
-
-msgr = Qpid::Proton::Messenger::Messenger.new
-msgr.start
-
-$options[:address].each {|addr| msgr.subscribe(addr)}
-
-def dispatch(request, response)
-  response.subject = "Re: #{request.subject}" if !request.subject.empty?
-  response.properties = request.properties
-  puts "Dispatched #{request.subject} #{request.properties}"
-end
-
-msg = Qpid::Proton::Message.new
-reply = Qpid::Proton::Message.new
-
-loop do
-  msgr.receive(10) if msgr.incoming < 10
-
-  if msgr.incoming > 0
-    msgr.get(msg)
-    if !msg.reply_to.nil? && !msg.reply_to.empty?
-      puts msg.reply_to
-      reply.address = msg.reply_to
-      reply.correlation_id = msg.correlation_id
-      reply.body = msg.body
-    end
-    dispatch(msg, reply)
-    msgr.put(reply)
-    msgr.send
-  end
-end
-
-msgr.stop

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/nonblocking_recv.rb
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/nonblocking_recv.rb b/examples/ruby/messenger/nonblocking_recv.rb
deleted file mode 100644
index 09dc3f9..0000000
--- a/examples/ruby/messenger/nonblocking_recv.rb
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-require 'qpid_proton'
-require 'optparse'
-
-Thread.new do
-  print "This is a side thread:\n"
-  loop do
-    print "The time is now #{Time.new.strftime('%I:%M:%S')}.\n"
-    sleep 1
-  end
-end
-
-addresses = []
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: recv.rb <addr1> ... <addrn>"
-  opts.parse!
-
-  addresses = ARGV
-end
-
-addresses = ["~0.0.0.0"] if addresses.empty?
-
-messenger = Qpid::Proton::Messenger::Messenger.new
-messenger.passive = true
-
-begin
-  messenger.start
-rescue ProtonError => error
-  print "ERROR: #{error.message}\n"
-  print error.backtrace.join("\n")
-  exit
-end
-
-addresses.each do |address|
-  begin
-    messenger.subscribe(address)
-  rescue Qpid::Proton::ProtonError => error
-    print "ERROR: #{error.message}\n"
-    exit
-  end
-end
-
-msg = Qpid::Proton::Message.new
-
-read_array = []
-write_array = []
-selectables = {}
-
-loop do
-
-  # wait for incoming messages
-  sel = messenger.selectable
-  while !sel.nil?
-    if sel.terminal?
-      selectables.delete(sel.fileno)
-      read_array.delete(sel)
-      write_array.delete(sel)
-      sel.free
-    else
-      if !sel.registered?
-        read_array << sel
-        write_array << sel
-        selectables[sel.fileno] = sel
-        sel.registered = true
-      end
-    end
-    sel = messenger.selectable
-  end
-
-  unless selectables.empty?
-    rarray = []; read_array.each {|fd| rarray << fd.to_io }
-    warray = []; write_array.each {|fd| warray << fd.to_io }
-
-    if messenger.deadline > 0.0
-      result = IO.select(rarray, warray, nil, messenger.deadline)
-    else
-      result = IO.select(rarray, warray)
-    end
-
-    unless result.nil? && result.empty?
-      result.flatten.each do |io|
-        sel = selectables[io.fileno]
-
-        sel.writable
-        sel.readable
-      end
-    end
-
-    begin
-      messenger.receive(10)
-    rescue Qpid::Proton::ProtonError => error
-      print "ERROR: #{error.message}\n"
-      exit
-    end
-
-    while messenger.incoming.nonzero?
-      begin
-        messenger.get(msg)
-      rescue Qpid::Proton::Error => error
-        print "ERROR: #{error.message}\n"
-        exit
-      end
-
-      print "Address: #{msg.address}\n"
-      subject = msg.subject || "(no subject)"
-      print "Subject: #{subject}\n"
-      print "Body: #{msg.body}\n"
-      print "Properties: #{msg.properties}\n"
-      print "Instructions: #{msg.instructions}\n"
-      print "Annotations: #{msg.annotations}\n"
-
-      if msg.reply_to
-        print "=== Sending a reply to #{msg.reply_to}\n"
-        reply = Qpid::Proton::Message.new
-        reply.address = msg.reply_to
-        reply.subject = "RE: #{msg.subject}"
-        reply.body = "Thanks for the message!"
-
-        messenger.put(reply)
-        messenger.send
-      end
-    end
-  end
-end
-
-messenger.stop

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/recv.rb
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/recv.rb b/examples/ruby/messenger/recv.rb
deleted file mode 100644
index 960de4d..0000000
--- a/examples/ruby/messenger/recv.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-require 'qpid_proton'
-require 'optparse'
-
-addresses = []
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: recv.rb <addr1> ... <addrn>"
-  opts.parse!
-
-  addresses = ARGV
-end
-
-addresses = ["~0.0.0.0"] if addresses.empty?
-
-messenger = Qpid::Proton::Messenger::Messenger.new
-
-begin
-  messenger.start
-rescue ProtonError => error
-  puts "ERROR: #{error.message}"
-  puts error.backtrace.join("\n")
-  exit
-end
-
-addresses.each do |address|
-  begin
-    messenger.subscribe(address)
-  rescue Qpid::Proton::ProtonError => error
-    puts "ERROR: #{error.message}"
-    exit
-  end
-end
-
-msg = Qpid::Proton::Message.new
-
-loop do
-  begin
-    messenger.receive(10)
-  rescue Qpid::Proton::ProtonError => error
-    puts "ERROR: #{error.message}"
-    exit
-  end
-
-  while messenger.incoming.nonzero?
-    begin
-      messenger.get(msg)
-    rescue Qpid::Proton::Error => error
-      puts "ERROR: #{error.message}"
-      exit
-    end
-
-    puts "Address: #{msg.address}"
-    subject = msg.subject || "(no subject)"
-    puts "Subject: #{subject}"
-    puts "Body: #{msg.body}"
-    puts "Properties: #{msg.properties}"
-    puts "Instructions: #{msg.instructions}"
-    puts "Annotations: #{msg.annotations}"
-  end
-end
-
-messenger.stop
-

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/examples/ruby/messenger/send.rb
----------------------------------------------------------------------
diff --git a/examples/ruby/messenger/send.rb b/examples/ruby/messenger/send.rb
deleted file mode 100644
index bdbeb4d..0000000
--- a/examples/ruby/messenger/send.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-require 'qpid_proton'
-require 'optparse'
-
-options = {}
-messages = []
-
-OptionParser.new do |opts|
-  opts.banner = "Usage: send.rb [options] <msg1> ... <msgn>"
-  opts.on("-a", "--address [addr]", "The receiver's address (def. 0.0.0.0)") do |f|
-    options[:address] = f
-  end
-
-  opts.parse!
-
-  messages = ARGV
-end
-
-options[:address] = "0.0.0.0" unless options[:address]
-messages << "Hello world!" if messages.empty?
-
-messenger = Qpid::Proton::Messenger::Messenger.new
-messenger.start
-msg = Qpid::Proton::Message.new
-
-messages.each do |message|
-  msg.address = options[:address]
-  msg.subject = "How are you?"
-  msg["sent"] = Time.new
-  msg["hostname"] = ENV["HOSTNAME"]
-  msg.instructions["fold"] = "yes"
-  msg.instructions["spindle"] = "no"
-  msg.instructions["mutilate"] = "no"
-  msg.annotations["version"] = 1.0
-  msg.annotations["pill"] = :RED
-  msg.body = message
-
-  begin
-    messenger.put(msg)
-  rescue Qpid::Proton::ProtonError => error
-    puts "ERROR: #{error.message}"
-    exit
-  end
-end
-
-begin
-  messenger.send
-rescue Qpid::Proton::ProtonError => error
-  puts "ERROR: #{error.message}"
-  puts error.backtrace.join("\n")
-  exit
-end
-
-puts "SENT: " + messages.join(",")
-
-messenger.stop

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6888ab5e/proton-c/bindings/ruby/lib/messenger/messenger.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/messenger/messenger.rb b/proton-c/bindings/ruby/lib/messenger/messenger.rb
index 79a9bcf..ecb5d57 100644
--- a/proton-c/bindings/ruby/lib/messenger/messenger.rb
+++ b/proton-c/bindings/ruby/lib/messenger/messenger.rb
@@ -18,7 +18,10 @@
 #
 
 module Qpid::Proton::Messenger
+  warn "[DEPRECATION] `Qpid::Proton::Messenger` is deprecated, use `Qpid::Proton::Container`"
 
+  # @deprecated Please use {Qpid::Proton::Container} instead.
+  #
   # The +Messenger+ class defines a high level interface for
   # sending and receiving Messages. Every Messenger contains
   # a single logical queue of incoming messages and a single
@@ -37,7 +40,7 @@ module Qpid::Proton::Messenger
   #
   # The put method copies its Message to the outgoing queue, and may
   # send queued messages if it can do so without blocking.  The send
-  # method blocks until it has sent the requested number of messages,
+  # method blocks until it has sent the requested number of 
   # or until a timeout interrupts the attempt.
   #
   # Similarly, the recv method receives messages into the incoming


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org