activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene79 <spamacc...@yahoo.com>
Subject Re: durable subscriber support in stomp.rb
Date Wed, 10 Sep 2008 21:26:02 GMT

here is test code for subscriber
----------------------------------

 
require 'rubygems'
require 'stomp'

# activemq uses client-id: and activemq.subscriptionName: headers to
uniquely
# identify a subscription. This is required for durable subscribers

@conn = Stomp::Connection.open nil, nil, "localhost", 61613, "testClient"
# @conn = Stomp::Connection.open nil, nil, "localhost", 5000, "testClient"

@conn.subscribe '/topic/event', { :ack =>"auto", "activemq.subscriptionName"
=> "testSubscription" }
while true 
    @msg = @conn.receive
    puts @msg.body
end
@conn.disconnect

-- 
View this message in context: http://www.nabble.com/durable-subscriber-support-in-stomp.rb-tp19381804p19423451.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message