Fix proton-cpp pom missing version
Fix proton-ruby script (update according to proton 0.8) Fix core example doc
This commit is contained in:
parent
0d599b856a
commit
5ea0a3055d
|
@ -33,7 +33,7 @@ under the License.
|
|||
|
||||
|
||||
<h2>Example step-by-step</h2>
|
||||
<p><i>To run the example, simply type <code>mvn -Pserver</code> from this directory to start the server and <code>mvn -Pclient</code> to run the client example</i></p>
|
||||
<p><i>To run the example, simply type <code>mvn verify -Pserver</code> from this directory to start the server and <code>mvn verify -Pclient</code> to run the client example</i></p>
|
||||
<p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, ActiveMQServer, start it and operate on JMS regularly</p>
|
||||
<br/>
|
||||
<ol>
|
||||
|
|
|
@ -38,7 +38,7 @@ under the License.
|
|||
<p>ActiveMQ Embedded could be used from very simple use cases with only InVM support to very complex cases with clustering, persistence and fail over.</p>
|
||||
|
||||
<h2>Example step-by-step</h2>
|
||||
<p><i>To run the example, simply type <code>mvn -Pexample</code> from this directory</i></p>
|
||||
<p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
|
||||
<p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, ActiveMQServer, start it and operate on JMS regularly</p>
|
||||
|
||||
<ol>
|
||||
|
|
|
@ -50,6 +50,7 @@ under the License.
|
|||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jms_2.0_spec</artifactId>
|
||||
<version>${geronimo.jms.2.spec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
|
|
|
@ -20,6 +20,7 @@ require 'qpid_proton'
|
|||
|
||||
messenger = Qpid::Proton::Messenger.new()
|
||||
messenger.incoming_window = 10
|
||||
messenger.timeout = 10000
|
||||
|
||||
begin
|
||||
messenger.start
|
||||
|
@ -39,7 +40,7 @@ end
|
|||
msg = Qpid::Proton::Message.new
|
||||
|
||||
begin
|
||||
messenger.receive(10)
|
||||
messenger.receive(1)
|
||||
rescue Qpid::Proton::ProtonError => error
|
||||
puts "ERROR: #{error.message}"
|
||||
exit
|
||||
|
@ -49,14 +50,14 @@ msg = Qpid::Proton::Message.new
|
|||
begin
|
||||
messenger.get(msg)
|
||||
# for 0.5:
|
||||
messenger.accept()
|
||||
# messenger.accept()
|
||||
|
||||
# for 0.4:
|
||||
#messenger.accept(messenger.incoming_tracker, 0)#1 would mean cumulative
|
||||
|
||||
# optional and the same in both versions (messenger will
|
||||
# settle itself when tracker passes out the window)
|
||||
messenger.settle(messenger.incoming_tracker, 0)
|
||||
# messenger.settle(messenger.incoming_tracker)
|
||||
|
||||
|
||||
rescue Qpid::Proton::Error => error
|
||||
|
@ -66,7 +67,7 @@ msg = Qpid::Proton::Message.new
|
|||
|
||||
puts "Address: #{msg.address}"
|
||||
puts "Subject: #{msg.subject}"
|
||||
puts "Content: #{msg.content}"
|
||||
puts "Content: #{msg.body}"
|
||||
puts "Message ID: #{msg.id}"
|
||||
end
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ messenger.start
|
|||
msg = Qpid::Proton::Message.new
|
||||
msg.address = address
|
||||
msg.subject = "The time is #{Time.new}"
|
||||
msg.content = "Hello world!"
|
||||
msg.body = "Hello world!"
|
||||
msg.correlation_id = "554545"
|
||||
|
||||
begin
|
||||
|
@ -44,6 +44,6 @@ rescue Qpid::Proton::ProtonError => error
|
|||
exit
|
||||
end
|
||||
|
||||
puts "SENT: " + msg.content
|
||||
puts "SENT: " + msg.body
|
||||
|
||||
messenger.stop
|
||||
|
|
Loading…
Reference in New Issue