def run2
puts "run2 method ...."
urc = defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ ? true : false
ssl_opts = Stomp::SSLParams.new(:ssl_ctxopts => Stomp::Connection::ssl_v2xoptions(),
:use_ruby_ciphers => urc,
:fsck => true)
sport = ENV["STOMP_PORT"].to_i
hash = { :hosts => [
{:login => 'guest', :passcode => 'guest', :host => 'localhost', :port => sport, :ssl => ssl_opts},
],
:reliable => false,
}
puts "Connect starts, SSLContext Options Set: #{Stomp::Connection::ssl_v2xoptions()}"
c = Stomp::Connection.new(hash)
puts "Connect completed"
puts "SSL Verify Result: #{ssl_opts.verify_result}"
c.disconnect
end