qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [45/52] [abbrv] [partial] qpid-site git commit: publish latest updates and proton[-j] 0.17.0 release content
Date Wed, 08 Feb 2017 22:00:57 GMT
http://git-wip-us.apache.org/repos/asf/qpid-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html
new file mode 100644
index 0000000..39e2083
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html
@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<!--
+ -
+ - 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.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Ruby AMQP Messenger Examples - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/java-broker/index.html">Broker for Java</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.17.0/index.html">Qpid Proton 0.17.0</a></li><li>Ruby AMQP Messenger Examples</li></ul>
+
+        <div id="-middle-content">
+          <h1 id="ruby-amqp-messenger-examples">Ruby AMQP Messenger Examples</h1>
+
+<h2 id="example-files">Example files</h2>
+
+<ul>
+<li><a href="client.rb.html">client.rb</a></li>
+<li><a href="mailserver.rb.html">mailserver.rb</a></li>
+<li><a href="nonblocking_recv.rb.html">nonblocking_recv.rb</a></li>
+<li><a href="recv.rb.html">recv.rb</a></li>
+<li><a href="send.rb.html">send.rb</a></li>
+</ul>
+
+<h2 id="more-information">More information</h2>
+
+<ul>
+<li><a href="https://github.com/apache/qpid-proton/tree/0.17.0/examples/ruby/messenger">Source location</a></li>
+</ul>
+
+
+          <hr/>
+
+          <ul id="-apache-navigation">
+            <li><a href="http://www.apache.org/">Apache</a></li>
+            <li><a href="http://www.apache.org/licenses/">License</a></li>
+            <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+            <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+            <li><a href="/security.html">Security</a></li>
+            <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li>
+          </ul>
+
+          <p id="-legal">
+            Apache Qpid, Messaging built on AMQP; Copyright &#169; 2015
+            The Apache Software Foundation; Licensed under
+            the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+            License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+            Proton, Apache, the Apache feather logo, and the Apache Qpid
+            project logo are trademarks of The Apache Software
+            Foundation; All other marks mentioned may be trademarks or
+            registered trademarks of their respective owners
+          </p>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb
new file mode 100755
index 0000000..594a0e3
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb
@@ -0,0 +1,84 @@
+#!/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-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb.html b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb.html
new file mode 100644
index 0000000..4332182
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/mailserver.rb.html
@@ -0,0 +1,213 @@
+<!DOCTYPE html>
+<!--
+ -
+ - 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.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>mailserver.rb - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/java-broker/index.html">Broker for Java</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.17.0/index.html">Qpid Proton 0.17.0</a></li><li><a href="/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html">Ruby AMQP Messenger Examples</a></li><li>mailserver.rb</li></ul>
+
+        <div id="-middle-content">
+          
+<h1>mailserver.rb</h1>
+<div class="highlight"><pre><span class="nb">require</span> <span class="s1">&#39;qpid_proton&#39;</span>
+<span class="nb">require</span> <span class="s1">&#39;optparse&#39;</span>
+
+<span class="no">FAILED</span>         <span class="o">=</span> <span class="mi">0</span>
+<span class="no">CONNECTION_UP</span>  <span class="o">=</span> <span class="mi">1</span>
+<span class="no">AUTHENTICATING</span> <span class="o">=</span> <span class="mi">2</span>
+
+<span class="vg">$options</span>  <span class="o">=</span> <span class="p">{</span>
+  <span class="ss">:verbose</span> <span class="o">=&gt;</span> <span class="kp">false</span><span class="p">,</span>
+  <span class="ss">:address</span> <span class="o">=&gt;</span> <span class="o">[</span><span class="s2">&quot;amqp://~0.0.0.0&quot;</span><span class="o">]</span><span class="p">,</span>
+<span class="p">}</span>
+
+<span class="no">OptionParser</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span> <span class="o">|</span><span class="n">opts</span><span class="o">|</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">banner</span> <span class="o">=</span> <span class="s2">&quot;Usage: mailserver [options] &lt;addr_1&gt; ... &lt;addr_n&gt;&quot;</span>
+
+  <span class="n">opts</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&quot;-v&quot;</span><span class="p">,</span> <span class="s2">&quot;--verbose&quot;</span><span class="p">,</span> <span class="ss">:NONE</span><span class="p">,</span>
+          <span class="s2">&quot;Print status messages to stdout&quot;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">f</span><span class="o">|</span>
+    <span class="vg">$options</span><span class="o">[</span><span class="ss">:verbose</span><span class="o">]</span> <span class="o">=</span> <span class="kp">true</span>
+  <span class="k">end</span>
+
+  <span class="n">opts</span><span class="o">.</span><span class="n">parse!</span>
+
+  <span class="k">if</span> <span class="no">ARGV</span><span class="o">.</span><span class="n">length</span> <span class="o">&gt;</span> <span class="mi">0</span>
+    <span class="vg">$options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span> <span class="o">=</span> <span class="o">[]</span>
+    <span class="no">ARGV</span><span class="o">.</span><span class="n">each</span> <span class="p">{</span><span class="o">|</span><span class="n">address</span><span class="o">|</span> <span class="vg">$options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span> <span class="o">&lt;&lt;</span> <span class="n">address</span><span class="p">}</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="k">def</span> <span class="nf">log</span><span class="p">(</span><span class="n">text</span><span class="p">)</span>
+  <span class="no">STDOUT</span><span class="o">.</span><span class="n">puts</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="no">Time</span><span class="o">.</span><span class="n">new</span><span class="si">}</span><span class="s2">: </span><span class="si">#{</span><span class="n">text</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="vg">$options</span><span class="o">[</span><span class="ss">:verbose</span><span class="o">]</span>
+<span class="k">end</span>
+
+<span class="n">msgr</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="ss">Messenger</span><span class="p">:</span><span class="ss">:Messenger</span><span class="o">.</span><span class="n">new</span>
+<span class="n">msgr</span><span class="o">.</span><span class="n">start</span>
+
+<span class="vg">$options</span><span class="o">[</span><span class="ss">:address</span><span class="o">].</span><span class="n">each</span> <span class="p">{</span><span class="o">|</span><span class="n">addr</span><span class="o">|</span> <span class="n">msgr</span><span class="o">.</span><span class="n">subscribe</span><span class="p">(</span><span class="n">addr</span><span class="p">)}</span>
+
+<span class="k">def</span> <span class="nf">dispatch</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">response</span><span class="p">)</span>
+  <span class="n">response</span><span class="o">.</span><span class="n">subject</span> <span class="o">=</span> <span class="s2">&quot;Re: </span><span class="si">#{</span><span class="n">request</span><span class="o">.</span><span class="n">subject</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="o">!</span><span class="n">request</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">empty?</span>
+  <span class="n">response</span><span class="o">.</span><span class="n">properties</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">properties</span>
+  <span class="nb">puts</span> <span class="s2">&quot;Dispatched </span><span class="si">#{</span><span class="n">request</span><span class="o">.</span><span class="n">subject</span><span class="si">}</span><span class="s2"> </span><span class="si">#{</span><span class="n">request</span><span class="o">.</span><span class="n">properties</span><span class="si">}</span><span class="s2">&quot;</span>
+<span class="k">end</span>
+
+<span class="n">msg</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+<span class="n">reply</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+
+<span class="kp">loop</span> <span class="k">do</span>
+  <span class="n">msgr</span><span class="o">.</span><span class="n">receive</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="k">if</span> <span class="n">msgr</span><span class="o">.</span><span class="n">incoming</span> <span class="o">&lt;</span> <span class="mi">10</span>
+
+  <span class="k">if</span> <span class="n">msgr</span><span class="o">.</span><span class="n">incoming</span> <span class="o">&gt;</span> <span class="mi">0</span>
+    <span class="n">msgr</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
+    <span class="k">if</span> <span class="o">!</span><span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span><span class="o">.</span><span class="n">nil?</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span><span class="o">.</span><span class="n">empty?</span>
+      <span class="nb">puts</span> <span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span>
+      <span class="n">reply</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span>
+      <span class="n">reply</span><span class="o">.</span><span class="n">correlation_id</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">correlation_id</span>
+      <span class="n">reply</span><span class="o">.</span><span class="n">body</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">body</span>
+    <span class="k">end</span>
+    <span class="n">dispatch</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">reply</span><span class="p">)</span>
+    <span class="n">msgr</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">reply</span><span class="p">)</span>
+    <span class="n">msgr</span><span class="o">.</span><span class="n">send</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">msgr</span><span class="o">.</span><span class="n">stop</span>
+</pre></div>
+
+<p><a href="mailserver.rb">Download this file</a></p>
+
+
+          <hr/>
+
+          <ul id="-apache-navigation">
+            <li><a href="http://www.apache.org/">Apache</a></li>
+            <li><a href="http://www.apache.org/licenses/">License</a></li>
+            <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+            <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+            <li><a href="/security.html">Security</a></li>
+            <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li>
+          </ul>
+
+          <p id="-legal">
+            Apache Qpid, Messaging built on AMQP; Copyright &#169; 2015
+            The Apache Software Foundation; Licensed under
+            the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+            License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+            Proton, Apache, the Apache feather logo, and the Apache Qpid
+            project logo are trademarks of The Apache Software
+            Foundation; All other marks mentioned may be trademarks or
+            registered trademarks of their respective owners
+          </p>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb
new file mode 100755
index 0000000..09dc3f9
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb
@@ -0,0 +1,145 @@
+#!/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-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb.html b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb.html
new file mode 100644
index 0000000..43e87e2
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/nonblocking_recv.rb.html
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!--
+ -
+ - 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.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>nonblocking_recv.rb - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/java-broker/index.html">Broker for Java</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.17.0/index.html">Qpid Proton 0.17.0</a></li><li><a href="/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html">Ruby AMQP Messenger Examples</a></li><li>nonblocking_recv.rb</li></ul>
+
+        <div id="-middle-content">
+          
+<h1>nonblocking_recv.rb</h1>
+<div class="highlight"><pre><span class="nb">require</span> <span class="s1">&#39;qpid_proton&#39;</span>
+<span class="nb">require</span> <span class="s1">&#39;optparse&#39;</span>
+
+<span class="no">Thread</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span>
+  <span class="nb">print</span> <span class="s2">&quot;This is a side thread:</span><span class="se">\n</span><span class="s2">&quot;</span>
+  <span class="kp">loop</span> <span class="k">do</span>
+    <span class="nb">print</span> <span class="s2">&quot;The time is now </span><span class="si">#{</span><span class="no">Time</span><span class="o">.</span><span class="n">new</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%I:%M:%S&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">.</span><span class="se">\n</span><span class="s2">&quot;</span>
+    <span class="nb">sleep</span> <span class="mi">1</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">addresses</span> <span class="o">=</span> <span class="o">[]</span>
+
+<span class="no">OptionParser</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span> <span class="o">|</span><span class="n">opts</span><span class="o">|</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">banner</span> <span class="o">=</span> <span class="s2">&quot;Usage: recv.rb &lt;addr1&gt; ... &lt;addrn&gt;&quot;</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">parse!</span>
+
+  <span class="n">addresses</span> <span class="o">=</span> <span class="no">ARGV</span>
+<span class="k">end</span>
+
+<span class="n">addresses</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;~0.0.0.0&quot;</span><span class="o">]</span> <span class="k">if</span> <span class="n">addresses</span><span class="o">.</span><span class="n">empty?</span>
+
+<span class="n">messenger</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="ss">Messenger</span><span class="p">:</span><span class="ss">:Messenger</span><span class="o">.</span><span class="n">new</span>
+<span class="n">messenger</span><span class="o">.</span><span class="n">passive</span> <span class="o">=</span> <span class="kp">true</span>
+
+<span class="k">begin</span>
+  <span class="n">messenger</span><span class="o">.</span><span class="n">start</span>
+<span class="k">rescue</span> <span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+  <span class="nb">print</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+  <span class="nb">print</span> <span class="n">error</span><span class="o">.</span><span class="n">backtrace</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+  <span class="nb">exit</span>
+<span class="k">end</span>
+
+<span class="n">addresses</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">address</span><span class="o">|</span>
+  <span class="k">begin</span>
+    <span class="n">messenger</span><span class="o">.</span><span class="n">subscribe</span><span class="p">(</span><span class="n">address</span><span class="p">)</span>
+  <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+    <span class="nb">print</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+    <span class="nb">exit</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">msg</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+
+<span class="n">read_array</span> <span class="o">=</span> <span class="o">[]</span>
+<span class="n">write_array</span> <span class="o">=</span> <span class="o">[]</span>
+<span class="n">selectables</span> <span class="o">=</span> <span class="p">{}</span>
+
+<span class="kp">loop</span> <span class="k">do</span>
+
+  <span class="c1"># wait for incoming messages</span>
+  <span class="n">sel</span> <span class="o">=</span> <span class="n">messenger</span><span class="o">.</span><span class="n">selectable</span>
+  <span class="k">while</span> <span class="o">!</span><span class="n">sel</span><span class="o">.</span><span class="n">nil?</span>
+    <span class="k">if</span> <span class="n">sel</span><span class="o">.</span><span class="n">terminal?</span>
+      <span class="n">selectables</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="n">sel</span><span class="o">.</span><span class="n">fileno</span><span class="p">)</span>
+      <span class="n">read_array</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="n">sel</span><span class="p">)</span>
+      <span class="n">write_array</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="n">sel</span><span class="p">)</span>
+      <span class="n">sel</span><span class="o">.</span><span class="n">free</span>
+    <span class="k">else</span>
+      <span class="k">if</span> <span class="o">!</span><span class="n">sel</span><span class="o">.</span><span class="n">registered?</span>
+        <span class="n">read_array</span> <span class="o">&lt;&lt;</span> <span class="n">sel</span>
+        <span class="n">write_array</span> <span class="o">&lt;&lt;</span> <span class="n">sel</span>
+        <span class="n">selectables</span><span class="o">[</span><span class="n">sel</span><span class="o">.</span><span class="n">fileno</span><span class="o">]</span> <span class="o">=</span> <span class="n">sel</span>
+        <span class="n">sel</span><span class="o">.</span><span class="n">registered</span> <span class="o">=</span> <span class="kp">true</span>
+      <span class="k">end</span>
+    <span class="k">end</span>
+    <span class="n">sel</span> <span class="o">=</span> <span class="n">messenger</span><span class="o">.</span><span class="n">selectable</span>
+  <span class="k">end</span>
+
+  <span class="k">unless</span> <span class="n">selectables</span><span class="o">.</span><span class="n">empty?</span>
+    <span class="n">rarray</span> <span class="o">=</span> <span class="o">[]</span><span class="p">;</span> <span class="n">read_array</span><span class="o">.</span><span class="n">each</span> <span class="p">{</span><span class="o">|</span><span class="n">fd</span><span class="o">|</span> <span class="n">rarray</span> <span class="o">&lt;&lt;</span> <span class="n">fd</span><span class="o">.</span><span class="n">to_io</span> <span class="p">}</span>
+    <span class="n">warray</span> <span class="o">=</span> <span class="o">[]</span><span class="p">;</span> <span class="n">write_array</span><span class="o">.</span><span class="n">each</span> <span class="p">{</span><span class="o">|</span><span class="n">fd</span><span class="o">|</span> <span class="n">warray</span> <span class="o">&lt;&lt;</span> <span class="n">fd</span><span class="o">.</span><span class="n">to_io</span> <span class="p">}</span>
+
+    <span class="k">if</span> <span class="n">messenger</span><span class="o">.</span><span class="n">deadline</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="o">.</span><span class="mi">0</span>
+      <span class="n">result</span> <span class="o">=</span> <span class="no">IO</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="n">rarray</span><span class="p">,</span> <span class="n">warray</span><span class="p">,</span> <span class="kp">nil</span><span class="p">,</span> <span class="n">messenger</span><span class="o">.</span><span class="n">deadline</span><span class="p">)</span>
+    <span class="k">else</span>
+      <span class="n">result</span> <span class="o">=</span> <span class="no">IO</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="n">rarray</span><span class="p">,</span> <span class="n">warray</span><span class="p">)</span>
+    <span class="k">end</span>
+
+    <span class="k">unless</span> <span class="n">result</span><span class="o">.</span><span class="n">nil?</span> <span class="o">&amp;&amp;</span> <span class="n">result</span><span class="o">.</span><span class="n">empty?</span>
+      <span class="n">result</span><span class="o">.</span><span class="n">flatten</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">io</span><span class="o">|</span>
+        <span class="n">sel</span> <span class="o">=</span> <span class="n">selectables</span><span class="o">[</span><span class="n">io</span><span class="o">.</span><span class="n">fileno</span><span class="o">]</span>
+
+        <span class="n">sel</span><span class="o">.</span><span class="n">writable</span>
+        <span class="n">sel</span><span class="o">.</span><span class="n">readable</span>
+      <span class="k">end</span>
+    <span class="k">end</span>
+
+    <span class="k">begin</span>
+      <span class="n">messenger</span><span class="o">.</span><span class="n">receive</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
+    <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+      <span class="nb">print</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="nb">exit</span>
+    <span class="k">end</span>
+
+    <span class="k">while</span> <span class="n">messenger</span><span class="o">.</span><span class="n">incoming</span><span class="o">.</span><span class="n">nonzero?</span>
+      <span class="k">begin</span>
+        <span class="n">messenger</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
+      <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Error</span> <span class="o">=&gt;</span> <span class="n">error</span>
+        <span class="nb">print</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+        <span class="nb">exit</span>
+      <span class="k">end</span>
+
+      <span class="nb">print</span> <span class="s2">&quot;Address: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">address</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="n">subject</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">subject</span> <span class="o">||</span> <span class="s2">&quot;(no subject)&quot;</span>
+      <span class="nb">print</span> <span class="s2">&quot;Subject: </span><span class="si">#{</span><span class="n">subject</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="nb">print</span> <span class="s2">&quot;Body: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">body</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="nb">print</span> <span class="s2">&quot;Properties: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">properties</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="nb">print</span> <span class="s2">&quot;Instructions: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">instructions</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+      <span class="nb">print</span> <span class="s2">&quot;Annotations: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">annotations</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+
+      <span class="k">if</span> <span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span>
+        <span class="nb">print</span> <span class="s2">&quot;=== Sending a reply to </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
+        <span class="n">reply</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+        <span class="n">reply</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">reply_to</span>
+        <span class="n">reply</span><span class="o">.</span><span class="n">subject</span> <span class="o">=</span> <span class="s2">&quot;RE: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">subject</span><span class="si">}</span><span class="s2">&quot;</span>
+        <span class="n">reply</span><span class="o">.</span><span class="n">body</span> <span class="o">=</span> <span class="s2">&quot;Thanks for the message!&quot;</span>
+
+        <span class="n">messenger</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">reply</span><span class="p">)</span>
+        <span class="n">messenger</span><span class="o">.</span><span class="n">send</span>
+      <span class="k">end</span>
+    <span class="k">end</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">messenger</span><span class="o">.</span><span class="n">stop</span>
+</pre></div>
+
+<p><a href="nonblocking_recv.rb">Download this file</a></p>
+
+
+          <hr/>
+
+          <ul id="-apache-navigation">
+            <li><a href="http://www.apache.org/">Apache</a></li>
+            <li><a href="http://www.apache.org/licenses/">License</a></li>
+            <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+            <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+            <li><a href="/security.html">Security</a></li>
+            <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li>
+          </ul>
+
+          <p id="-legal">
+            Apache Qpid, Messaging built on AMQP; Copyright &#169; 2015
+            The Apache Software Foundation; Licensed under
+            the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+            License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+            Proton, Apache, the Apache feather logo, and the Apache Qpid
+            project logo are trademarks of The Apache Software
+            Foundation; All other marks mentioned may be trademarks or
+            registered trademarks of their respective owners
+          </p>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb
new file mode 100755
index 0000000..960de4d
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb
@@ -0,0 +1,82 @@
+#!/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-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb.html b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb.html
new file mode 100644
index 0000000..12ea2d5
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/recv.rb.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<!--
+ -
+ - 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.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>recv.rb - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/java-broker/index.html">Broker for Java</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.17.0/index.html">Qpid Proton 0.17.0</a></li><li><a href="/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html">Ruby AMQP Messenger Examples</a></li><li>recv.rb</li></ul>
+
+        <div id="-middle-content">
+          
+<h1>recv.rb</h1>
+<div class="highlight"><pre><span class="nb">require</span> <span class="s1">&#39;qpid_proton&#39;</span>
+<span class="nb">require</span> <span class="s1">&#39;optparse&#39;</span>
+
+<span class="n">addresses</span> <span class="o">=</span> <span class="o">[]</span>
+
+<span class="no">OptionParser</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span> <span class="o">|</span><span class="n">opts</span><span class="o">|</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">banner</span> <span class="o">=</span> <span class="s2">&quot;Usage: recv.rb &lt;addr1&gt; ... &lt;addrn&gt;&quot;</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">parse!</span>
+
+  <span class="n">addresses</span> <span class="o">=</span> <span class="no">ARGV</span>
+<span class="k">end</span>
+
+<span class="n">addresses</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;~0.0.0.0&quot;</span><span class="o">]</span> <span class="k">if</span> <span class="n">addresses</span><span class="o">.</span><span class="n">empty?</span>
+
+<span class="n">messenger</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="ss">Messenger</span><span class="p">:</span><span class="ss">:Messenger</span><span class="o">.</span><span class="n">new</span>
+
+<span class="k">begin</span>
+  <span class="n">messenger</span><span class="o">.</span><span class="n">start</span>
+<span class="k">rescue</span> <span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+  <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+  <span class="nb">puts</span> <span class="n">error</span><span class="o">.</span><span class="n">backtrace</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+  <span class="nb">exit</span>
+<span class="k">end</span>
+
+<span class="n">addresses</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">address</span><span class="o">|</span>
+  <span class="k">begin</span>
+    <span class="n">messenger</span><span class="o">.</span><span class="n">subscribe</span><span class="p">(</span><span class="n">address</span><span class="p">)</span>
+  <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+    <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">exit</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">msg</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+
+<span class="kp">loop</span> <span class="k">do</span>
+  <span class="k">begin</span>
+    <span class="n">messenger</span><span class="o">.</span><span class="n">receive</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
+  <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+    <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">exit</span>
+  <span class="k">end</span>
+
+  <span class="k">while</span> <span class="n">messenger</span><span class="o">.</span><span class="n">incoming</span><span class="o">.</span><span class="n">nonzero?</span>
+    <span class="k">begin</span>
+      <span class="n">messenger</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
+    <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Error</span> <span class="o">=&gt;</span> <span class="n">error</span>
+      <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+      <span class="nb">exit</span>
+    <span class="k">end</span>
+
+    <span class="nb">puts</span> <span class="s2">&quot;Address: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">address</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="n">subject</span> <span class="o">=</span> <span class="n">msg</span><span class="o">.</span><span class="n">subject</span> <span class="o">||</span> <span class="s2">&quot;(no subject)&quot;</span>
+    <span class="nb">puts</span> <span class="s2">&quot;Subject: </span><span class="si">#{</span><span class="n">subject</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">puts</span> <span class="s2">&quot;Body: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">body</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">puts</span> <span class="s2">&quot;Properties: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">properties</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">puts</span> <span class="s2">&quot;Instructions: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">instructions</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">puts</span> <span class="s2">&quot;Annotations: </span><span class="si">#{</span><span class="n">msg</span><span class="o">.</span><span class="n">annotations</span><span class="si">}</span><span class="s2">&quot;</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="n">messenger</span><span class="o">.</span><span class="n">stop</span>
+</pre></div>
+
+<p><a href="recv.rb">Download this file</a></p>
+
+
+          <hr/>
+
+          <ul id="-apache-navigation">
+            <li><a href="http://www.apache.org/">Apache</a></li>
+            <li><a href="http://www.apache.org/licenses/">License</a></li>
+            <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+            <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+            <li><a href="/security.html">Security</a></li>
+            <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li>
+          </ul>
+
+          <p id="-legal">
+            Apache Qpid, Messaging built on AMQP; Copyright &#169; 2015
+            The Apache Software Foundation; Licensed under
+            the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+            License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+            Proton, Apache, the Apache feather logo, and the Apache Qpid
+            project logo are trademarks of The Apache Software
+            Foundation; All other marks mentioned may be trademarks or
+            registered trademarks of their respective owners
+          </p>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/qpid-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb
new file mode 100755
index 0000000..bdbeb4d
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb
@@ -0,0 +1,74 @@
+#!/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-site/blob/f180d00b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb.html b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb.html
new file mode 100644
index 0000000..4f16bc5
--- /dev/null
+++ b/content/releases/qpid-proton-0.17.0/messenger/ruby/examples/send.rb.html
@@ -0,0 +1,204 @@
+<!DOCTYPE html>
+<!--
+ -
+ - 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.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>send.rb - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/java-broker/index.html">Broker for Java</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.17.0/index.html">Qpid Proton 0.17.0</a></li><li><a href="/releases/qpid-proton-0.17.0/messenger/ruby/examples/index.html">Ruby AMQP Messenger Examples</a></li><li>send.rb</li></ul>
+
+        <div id="-middle-content">
+          
+<h1>send.rb</h1>
+<div class="highlight"><pre><span class="nb">require</span> <span class="s1">&#39;qpid_proton&#39;</span>
+<span class="nb">require</span> <span class="s1">&#39;optparse&#39;</span>
+
+<span class="n">options</span> <span class="o">=</span> <span class="p">{}</span>
+<span class="n">messages</span> <span class="o">=</span> <span class="o">[]</span>
+
+<span class="no">OptionParser</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span> <span class="o">|</span><span class="n">opts</span><span class="o">|</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">banner</span> <span class="o">=</span> <span class="s2">&quot;Usage: send.rb [options] &lt;msg1&gt; ... &lt;msgn&gt;&quot;</span>
+  <span class="n">opts</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="s2">&quot;-a&quot;</span><span class="p">,</span> <span class="s2">&quot;--address [addr]&quot;</span><span class="p">,</span> <span class="s2">&quot;The receiver&#39;s address (def. 0.0.0.0)&quot;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">f</span><span class="o">|</span>
+    <span class="n">options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span> <span class="o">=</span> <span class="n">f</span>
+  <span class="k">end</span>
+
+  <span class="n">opts</span><span class="o">.</span><span class="n">parse!</span>
+
+  <span class="n">messages</span> <span class="o">=</span> <span class="no">ARGV</span>
+<span class="k">end</span>
+
+<span class="n">options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span> <span class="o">=</span> <span class="s2">&quot;0.0.0.0&quot;</span> <span class="k">unless</span> <span class="n">options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span>
+<span class="n">messages</span> <span class="o">&lt;&lt;</span> <span class="s2">&quot;Hello world!&quot;</span> <span class="k">if</span> <span class="n">messages</span><span class="o">.</span><span class="n">empty?</span>
+
+<span class="n">messenger</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="ss">Messenger</span><span class="p">:</span><span class="ss">:Messenger</span><span class="o">.</span><span class="n">new</span>
+<span class="n">messenger</span><span class="o">.</span><span class="n">start</span>
+<span class="n">msg</span> <span class="o">=</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">Message</span><span class="o">.</span><span class="n">new</span>
+
+<span class="n">messages</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">message</span><span class="o">|</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">options</span><span class="o">[</span><span class="ss">:address</span><span class="o">]</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">subject</span> <span class="o">=</span> <span class="s2">&quot;How are you?&quot;</span>
+  <span class="n">msg</span><span class="o">[</span><span class="s2">&quot;sent&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="no">Time</span><span class="o">.</span><span class="n">new</span>
+  <span class="n">msg</span><span class="o">[</span><span class="s2">&quot;hostname&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="no">ENV</span><span class="o">[</span><span class="s2">&quot;HOSTNAME&quot;</span><span class="o">]</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">instructions</span><span class="o">[</span><span class="s2">&quot;fold&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="s2">&quot;yes&quot;</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">instructions</span><span class="o">[</span><span class="s2">&quot;spindle&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="s2">&quot;no&quot;</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">instructions</span><span class="o">[</span><span class="s2">&quot;mutilate&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="s2">&quot;no&quot;</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">annotations</span><span class="o">[</span><span class="s2">&quot;version&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="mi">1</span><span class="o">.</span><span class="mi">0</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">annotations</span><span class="o">[</span><span class="s2">&quot;pill&quot;</span><span class="o">]</span> <span class="o">=</span> <span class="ss">:RED</span>
+  <span class="n">msg</span><span class="o">.</span><span class="n">body</span> <span class="o">=</span> <span class="n">message</span>
+
+  <span class="k">begin</span>
+    <span class="n">messenger</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
+  <span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+    <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+    <span class="nb">exit</span>
+  <span class="k">end</span>
+<span class="k">end</span>
+
+<span class="k">begin</span>
+  <span class="n">messenger</span><span class="o">.</span><span class="n">send</span>
+<span class="k">rescue</span> <span class="ss">Qpid</span><span class="p">:</span><span class="ss">:Proton</span><span class="o">::</span><span class="no">ProtonError</span> <span class="o">=&gt;</span> <span class="n">error</span>
+  <span class="nb">puts</span> <span class="s2">&quot;ERROR: </span><span class="si">#{</span><span class="n">error</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
+  <span class="nb">puts</span> <span class="n">error</span><span class="o">.</span><span class="n">backtrace</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
+  <span class="nb">exit</span>
+<span class="k">end</span>
+
+<span class="nb">puts</span> <span class="s2">&quot;SENT: &quot;</span> <span class="o">+</span> <span class="n">messages</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
+
+<span class="n">messenger</span><span class="o">.</span><span class="n">stop</span>
+</pre></div>
+
+<p><a href="send.rb">Download this file</a></p>
+
+
+          <hr/>
+
+          <ul id="-apache-navigation">
+            <li><a href="http://www.apache.org/">Apache</a></li>
+            <li><a href="http://www.apache.org/licenses/">License</a></li>
+            <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+            <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+            <li><a href="/security.html">Security</a></li>
+            <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="" alt="Apache"/></a></li>
+          </ul>
+
+          <p id="-legal">
+            Apache Qpid, Messaging built on AMQP; Copyright &#169; 2015
+            The Apache Software Foundation; Licensed under
+            the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+            License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+            Proton, Apache, the Apache feather logo, and the Apache Qpid
+            project logo are trademarks of The Apache Software
+            Foundation; All other marks mentioned may be trademarks or
+            registered trademarks of their respective owners
+          </p>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>


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


Mime
View raw message