Class: PulsarSdk::Protocol::Topic

Inherits:
Object
  • Object
show all
Includes:
Tweaks::AssignAttributes
Defined in:
lib/pulsar_sdk/protocol/topic.rb

Constant Summary collapse

PUBLIC_TENANT =
'public'.freeze
DEFAULT_NAMESPACE =
'default'.freeze
PARTITIONED_TOPIC_SUFFIX =
'-partition-'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Tweaks::AssignAttributes

#assign_attributes, #initialize

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



10
11
12
# File 'lib/pulsar_sdk/protocol/topic.rb', line 10

def domain
  @domain
end

#namespaceObject

Returns the value of attribute namespace.



10
11
12
# File 'lib/pulsar_sdk/protocol/topic.rb', line 10

def namespace
  @namespace
end

#partitionObject

Returns the value of attribute partition.



10
11
12
# File 'lib/pulsar_sdk/protocol/topic.rb', line 10

def partition
  @partition
end

#topicObject

Returns the value of attribute topic.



10
11
12
# File 'lib/pulsar_sdk/protocol/topic.rb', line 10

def topic
  @topic
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
18
# File 'lib/pulsar_sdk/protocol/topic.rb', line 12

def to_s
  [
    mk_domain,
    self.namespace,
    mk_topic
  ].join('/')
end