class PostcardRB
Public Class Methods
new(dispatcher: @CONNECTION_RETRIES = 10)
click to toggle source
# File lib/postcard_rb.rb, line 4 def initialize dispatcher: @CONNECTION_RETRIES = 10 @CONNECTION_INTERVAL = 2 @dispatcher = dispatcher end
Public Instance Methods
connect()
click to toggle source
# File lib/postcard_rb.rb, line 11 def connect begin @dispatcher.connect( connectionInterval: @CONNECTION_INTERVAL, connectionRetries: @CONNECTION_RETRIES ) rescue DispatcherConnectionRefused raise PostcardConnectionRefused end end
createTopic(name:, routing: topic = @dispatcher.createTopic(name: name, routing: routing))
click to toggle source
# File lib/postcard_rb.rb, line 22 def createTopic name:, routing: topic = @dispatcher.createTopic(name: name, routing: routing) return topic end