Method: Azure::ServiceBus::Topic#initialize
- Defined in:
- lib/azure/service_bus/topic.rb
#initialize(name, options = {}) ⇒ Topic
Public: Initialize the topic.
Attributes
-
name- A String with the name of the topic. -
options- The resource options Hash
Options
Accepted key/value pairs in options parameter are:
-
:default_message_time_to_tive- XML datetime. Determines how long a message lives in the associated subscriptions. -
:maximum_number_of_subscriptions- Number. Specifies the maximum number of subscriptions that can be associated with the topic. -
:max_size_in_megabytes- Number. Specifies the maximum topic size in megabytes -
:requires_duplicate_detection- Boolean. If enabled, the topic will detect duplicate messages within the time span specified by the DuplicateDetectionHistoryTimeWindow property -
:dead_lettering_on_filter_evaluation_exceptions- Boolean. Determines how the Service Bus handles a message that causes an exception during a subscription’s filter evaluation. -
:duplicate_detection_history_time_window- XML datetime. Specifies the time span during which the Service Bus will detect message duplication. -
:enable_batched_operations- Boolean. Enables or disables service side batching behavior when performing operations for the specific queue.
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/azure/service_bus/topic.rb', line 38 def initialize(name, = {}) = {} ["DefaultMessageTimeToLive"] = [:default_message_time_to_live].to_s if .has_key?(:default_message_time_to_live) ["MaximumNumberOfSubscriptions"] = [:maximum_number_of_subscriptions].to_s if .has_key?(:maximum_number_of_subscriptions) ["MaxSizeInMegabytes"] = [:max_size_in_megabytes].to_s if .has_key?(:max_size_in_megabytes) ["RequiresDuplicateDetection"] = [:requires_duplicate_detection].to_s if .has_key?(:requires_duplicate_detection) ["DeadLetteringOnFilterEvaluationExceptions"] = [:dead_lettering_on_filter_evaluation_exceptions].to_s if .has_key?(:dead_lettering_on_filter_evaluation_exceptions) ["DuplicateDetectionHistoryTimeWindow"] = [:duplicate_detection_history_time_window].to_s if .has_key?(:duplicate_detection_history_time_window) ["EnableBatchedOperations"] = [:enable_batched_operations].to_s if .has_key?(:enable_batched_operations) super(name, ) end |