Method: Azure::ServiceBus::ServiceBusService#create_topic

Defined in:
lib/azure/service_bus/service_bus_service.rb

#create_topic(topic, options = {}) ⇒ Object

Creates a new topic. Once created, this topic resource manifest is immutable.

Attributes

  • topic - Azure::ServiceBus::Topic instance to create on server, or a string of the topic name

  • options - Hash. The topic properties.

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.



184
185
186
187
# File 'lib/azure/service_bus/service_bus_service.rb', line 184

def create_topic(topic, options={})
  topic = _new_or_existing(Azure::ServiceBus::Topic, topic, options ? options : {})
  create_resource_entry(:topic, topic, topic.name)
end