2016-03-27 23:34:44 +08:00
|
|
|
require 'rubygems'
|
|
|
|
require 'stomp'
|
|
|
|
|
|
|
|
client = Stomp::Client.new("guest", "guest", "localhost", 61613)
|
|
|
|
|
|
|
|
# This publishes a message to a queue named 'amq-test' which is managed by AMQP broker.
|
|
|
|
client.publish("/amq/queue/amq-test", "test-message")
|
2016-03-28 11:38:34 +08:00
|
|
|
|
|
|
|
# close this connection
|
|
|
|
client.close
|