Sha256: bf0e4b81bcbe40ab619fee9b02d0cd0c4a21ede746e054800628df239d1939dd
Contents?: true
Size: 547 Bytes
Versions: 5
Compression:
Stored size: 547 Bytes
Contents
# -*- encoding: utf-8 -*- require 'rubygems' require 'stomp' client = Stomp::Client.new("failover://(stomp://:@localhost:61613,stomp://:@remotehost:61613)?initialReconnectDelay=5000&randomize=false&useExponentialBackOff=false") puts "Subscribing ronaldo" client.subscribe("/queue/ronaldo", {:ack => "client", "activemq.prefetchSize" => 1, "activemq.exclusive" => true }) do |msg| File.open("file", "a") do |f| f.write(msg.body) f.write("\n----------------\n") end client.acknowledge(msg) end loop do sleep(1) puts "." end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
stomp-1.2.4 | examples/consumer.rb |
stomp-1.2.3 | examples/consumer.rb |
stomp-1.2.2 | examples/consumer.rb |
stomp-1.2.1 | examples/consumer.rb |
stomp-1.2.0 | examples/consumer.rb |