Created
October 7, 2015 22:01
-
-
Save enebo/53880ffc799ac9494ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sample | |
include com.hazelcast.core.MessageListener | |
def onMessage(msg) | |
puts "Message received = " + msg | |
end | |
end | |
sample = com.hazelcast.core.Sample.new | |
topic = com.hazelcast.core.SampleHazelcast.getTopic "default" | |
topic.addMessageListener sample | |
topic.publish "my-message-object" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment