Sha256: 976d84f5e94007959b547fbae8280be0353c4b0ba525c3d0086442ba2f740f5f

Contents?: true

Size: 640 Bytes

Versions: 34

Compression:

Stored size: 640 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'rubygems'
require 'stomp'
#
# == Example message publisher
#
class ExamplePublisher
  # Initialize.
  def initialize
  end
  # Run example.
  def run
    client = Stomp::Client.new("failover://(stomp://:@localhost:61613,stomp://:@remotehost:61613)?initialReconnectDelay=5000&randomize=false&useExponentialBackOff=false")
    message = "ronaldo #{ARGV[0]}"

    for i in (1..50)
      puts "Sending message"
      client.publish("/queue/ronaldo", "#{i}: #{message}", {:persistent => true})
      puts "(#{Time.now})Message sent: #{i}"
      sleep 0.2
    end
  end
end
#
e = ExamplePublisher.new
e.run



Version data entries

34 entries across 32 versions & 2 rubygems

Version Path
stomp-1.4.10 examples/historical/publisher.rb
stomp-1.4.9 examples/historical/publisher.rb
stomp-1.4.8 examples/historical/publisher.rb
stomp-1.4.7 examples/historical/publisher.rb
stomp-1.4.6 examples/historical/publisher.rb
stomp-1.4.5 examples/historical/publisher.rb
stomp-1.4.4 examples/publisher.rb
stomp-1.4.3 examples/publisher.rb
stomp-1.4.2 examples/publisher.rb
stomp-1.4.1 examples/publisher.rb
stomp-1.4.0 examples/publisher.rb
stomp-1.3.5 examples/publisher.rb
stomp-1.3.4 examples/publisher.rb
stomp-1.3.3 examples/publisher.rb
stomp-1.3.2 examples/publisher.rb
stomp-1.3.1 examples/publisher.rb
stomp-1.3.0 examples/publisher.rb
stomp-1.2.16 examples/publisher.rb
stomp-1.2.14 examples/publisher.rb
stomp-1.2.13 examples/publisher.rb