Files
Hermann/scripts/consume_msgs_loop_localhost.rb
Mpho raf a3ee1d4cd7
Some checks failed
ci-tests/Hermann/pipeline/head There was a failure building this commit
Added this initial testing html publish
2021-06-15 20:01:22 +02:00

16 lines
369 B
Ruby

require 'rubygems'
require 'lib/hermann'
require 'lib/hermann/consumer'
c = Hermann::Consumer.new( "lms_messages", :zookeepers => "localhost:2181", :group_id => "lms_message_consumer" )
t1 = 0
c.consume() do
|msg| puts("Received: #{msg}")
if(t1 == 0)
t1 = Time.now
end
t2 = Time.now
elapsed = t2 - t1
puts("Total elapsed time: #{elapsed} seconds")
end