activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Stomp - message woes - Ruby client
Date Tue, 01 Aug 2006 13:41:51 GMT
If you look in JMX do you see just a single consumer?

http://incubator.apache.org/activemq/jmx.html

On 8/1/06, Sandeep Chayapathi <sandeep@wssource.com> wrote:
> Hi all,
>
>  This is a followup to my earlier mail regarding Stomp and the perl
> client. I have a simple producer and consumer, using ruby client. Im
> using AMQ 4.0.1.
>
>  The problem is, every other message is missed by the consumer.
> Moreover, after a message has been consumed, it is not being removed
> from the queue.
>
>  Im not able to figure out what the issue is. Any help is greatly
> appreciated. Thanks in advance.
>
> Here is the destination policy being used:
>
> ---- activemq.xml ----
>     <destinationPolicy>
>       <policyMap><policyEntries>
>
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
>
>       </policyEntries></policyMap>
>     </destinationPolicy>
> -----------------------
>
>
>  Here is the code:
>
> ---- read.rb ------
> #!/usr/bin/env ruby
> require 'stomp'
>
> client = Stomp::Connection.new("test","user")
>
> client.subscribe "/queue/FOO.test"
>
> while TRUE
>     puts "sleeping"
>     sleep 0.01
>     msg = client.receive
>     puts msg.body
> end
> --------------------
>
>
> ---- write.rb ------
> #!/usr/bin/env ruby
> require 'stomp'
>
> client = Stomp::Connection.new("test","user")
>
> client.subscribe "/queue/FOO.test"
>
>
>
> for i in 0..10
>     sleep 1
>     client.send "/queue/FOO.test", "[Ruby] message " + i.to_s
>     puts "[Ruby] message " + i.to_s
> end
>
> client.disconnect
> ---------------------
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message