Class CreateTopicOptions
java.lang.Object
com.azure.messaging.servicebus.administration.models.CreateTopicOptions
Represents the set of options that can be specified for the creation of a topic.
-
Constructor Summary
ConstructorDescriptionCreates an instance.Initializes a new instance based on the specifiedCreateTopicOptions
instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the authorization rules to control user access at entity level.Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically deleted.Get the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value.Get the duplicateDetectionHistoryTimeWindow property: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history.Get the lockDuration property: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.int
Get the maxDeliveryCount property: The maximum delivery count.long
Get the maxMessageSizeInKilobytes property: The maximum size of a message in kilobytes.long
Get the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.Get the status property: Status of a Service Bus resource.Get the userMetadata property: Custom metdata that user can associate with the description.Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.Get the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection.Get the enablePartitioning property: A value that indicates whether the queue is to be partitioned across multiple message brokers.Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions.boolean
Defines whether ordering needs to be maintained.setAutoDeleteOnIdle
(Duration autoDeleteOnIdle) Set the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically deleted.setBatchedOperationsEnabled
(boolean enableBatchedOperations) Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.setDefaultMessageTimeToLive
(Duration defaultMessageTimeToLive) Set the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value.setDuplicateDetectionHistoryTimeWindow
(Duration duplicateDetectionHistoryTimeWindow) Set the duplicateDetectionHistoryTimeWindow property: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history.setDuplicateDetectionRequired
(boolean requiresDuplicateDetection) Set the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection.setLockDuration
(Duration lockDuration) Set the lockDuration property: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.setMaxDeliveryCount
(int maxDeliveryCount) Set the maxDeliveryCount property: The maximum delivery count.setMaxMessageSizeInKilobytes
(long maxMessageSizeInKilobytes) Set the maxMessageSizeInKilobytes property: Represents the default maximum message size (in kilobytes) Option only available in premium tier.setMaxSizeInMegabytes
(long maxSizeInMegabytes) Set the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.setOrderingSupported
(boolean supportOrdering) Defines whether ordering needs to be maintained.setPartitioningEnabled
(boolean enablePartitioning) Set the enablePartitioning property: A value that indicates whether the queue is to be partitioned across multiple message brokers.setSessionRequired
(boolean requiresSession) Set the requiresSession property: A value that indicates whether the queue supports the concept of sessions.setStatus
(EntityStatus status) Set the status property: Status of a Service Bus resource.setUserMetadata
(String userMetadata) Set the userMetadata property: Custom metdata that user can associate with the description.
-
Constructor Details
-
CreateTopicOptions
public CreateTopicOptions()Creates an instance. Default values for the topic are populated. The properties populated with defaults are:setAutoDeleteOnIdle(Duration)
is max duration value.setDefaultMessageTimeToLive(Duration)
is max duration value.setDuplicateDetectionHistoryTimeWindow(Duration)
is max duration value, but duplication detection is disabled.setDuplicateDetectionRequired(boolean)
is false.setBatchedOperationsEnabled(boolean)
(boolean)} is true.setLockDuration(Duration)
is 1 minute.setMaxDeliveryCount(int)
is 10.setMaxSizeInMegabytes(long)
is 1024MB.setSessionRequired(boolean)
is false.setStatus(EntityStatus)
isEntityStatus.ACTIVE
.
- Throws:
NullPointerException
- iftopicName
is a null.IllegalArgumentException
- iftopicName
is an empty string.
-
CreateTopicOptions
Initializes a new instance based on the specifiedCreateTopicOptions
instance. This is useful for creating a new topic based on the properties of an existing topicOptions.- Parameters:
topic
- Existing topicOptions to create options with.
-
-
Method Details
-
getAuthorizationRules
Gets the authorization rules to control user access at entity level.- Returns:
- The authorization rules to control user access at entity level.
-
getAutoDeleteOnIdle
Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.- Returns:
- the autoDeleteOnIdle value.
-
setAutoDeleteOnIdle
Set the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.- Parameters:
autoDeleteOnIdle
- the autoDeleteOnIdle value to set.- Returns:
- the CreateTopicOptions object itself.
-
getDefaultMessageTimeToLive
Get the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.- Returns:
- the defaultMessageTimeToLive value.
-
setDefaultMessageTimeToLive
Set the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.- Parameters:
defaultMessageTimeToLive
- the defaultMessageTimeToLive value to set.- Returns:
- the CreateTopicOptions object itself.
-
getDuplicateDetectionHistoryTimeWindow
Get the duplicateDetectionHistoryTimeWindow property: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.- Returns:
- the duplicateDetectionHistoryTimeWindow value.
-
setDuplicateDetectionHistoryTimeWindow
public CreateTopicOptions setDuplicateDetectionHistoryTimeWindow(Duration duplicateDetectionHistoryTimeWindow) Set the duplicateDetectionHistoryTimeWindow property: ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.- Parameters:
duplicateDetectionHistoryTimeWindow
- the duplicateDetectionHistoryTimeWindow value to set.- Returns:
- the CreateTopicOptions object itself.
-
isBatchedOperationsEnabled
Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.- Returns:
- the enableBatchedOperations value.
-
setBatchedOperationsEnabled
Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.- Parameters:
enableBatchedOperations
- the enableBatchedOperations value to set.- Returns:
- the CreateTopicOptions object itself.
-
isPartitioningEnabled
Get the enablePartitioning property: A value that indicates whether the queue is to be partitioned across multiple message brokers.- Returns:
- the enablePartitioning value.
-
setPartitioningEnabled
Set the enablePartitioning property: A value that indicates whether the queue is to be partitioned across multiple message brokers.- Parameters:
enablePartitioning
- the enablePartitioning value to set.- Returns:
- the CreateTopicOptions object itself.
-
getStatus
Get the status property: Status of a Service Bus resource.- Returns:
- the status value.
-
setStatus
Set the status property: Status of a Service Bus resource.- Parameters:
status
- the status value to set.- Returns:
- the CreateTopicOptions object itself.
-
isSupportOrdering
public boolean isSupportOrdering()Defines whether ordering needs to be maintained. If true, messages sent to topic will be forwarded to the subscription in order.- Returns:
- true if ordering should be maintained; false otherwise.
-
setOrderingSupported
Defines whether ordering needs to be maintained. If true, messages sent to topic will be forwarded to the subscription in order.- Parameters:
supportOrdering
- true if ordering should be maintained; false otherwise.- Returns:
- the CreateTopicOptions object itself.
-
getLockDuration
Get the lockDuration property: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.- Returns:
- the lockDuration value.
-
setLockDuration
Set the lockDuration property: ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.- Parameters:
lockDuration
- the lockDuration value to set.- Returns:
- the CreateTopicOptions object itself.
-
getMaxDeliveryCount
public int getMaxDeliveryCount()Get the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.- Returns:
- the maxDeliveryCount value.
-
setMaxDeliveryCount
Set the maxDeliveryCount property: The maximum delivery count. A message is automatically deadlettered after this number of deliveries. Default value is 10.- Parameters:
maxDeliveryCount
- the maxDeliveryCount value to set.- Returns:
- the CreateTopicOptions object itself.
-
getMaxSizeInMegabytes
public long getMaxSizeInMegabytes()Get the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.- Returns:
- the maxSizeInMegabytes value.
-
setMaxSizeInMegabytes
Set the maxSizeInMegabytes property: The maximum size of the queue in megabytes, which is the size of memory allocated for the queue.- Parameters:
maxSizeInMegabytes
- the maxSizeInMegabytes value to set.- Returns:
- the CreateTopicOptions object itself.
-
isDuplicateDetectionRequired
Get the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection.- Returns:
- the requiresDuplicateDetection value.
-
setDuplicateDetectionRequired
Set the requiresDuplicateDetection property: A value indicating if this queue requires duplicate detection.- Parameters:
requiresDuplicateDetection
- the requiresDuplicateDetection value to set.- Returns:
- the CreateTopicOptions object itself.
-
isSessionRequired
Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions.- Returns:
- the requiresSession value.
-
setSessionRequired
Set the requiresSession property: A value that indicates whether the queue supports the concept of sessions.- Parameters:
requiresSession
- the requiresSession value to set.- Returns:
- the CreateTopicOptions object itself.
-
getUserMetadata
Get the userMetadata property: Custom metdata that user can associate with the description. Max length is 1024 chars.- Returns:
- the userMetadata value.
-
setUserMetadata
Set the userMetadata property: Custom metdata that user can associate with the description. Max length is 1024 chars.- Parameters:
userMetadata
- the userMetadata value to set.- Returns:
- the CreateTopicOptions object itself.
-
getMaxMessageSizeInKilobytes
public long getMaxMessageSizeInKilobytes()Get the maxMessageSizeInKilobytes property: The maximum size of a message in kilobytes.- Returns:
- the maxMessageSizeInKilobytes value.
-
setMaxMessageSizeInKilobytes
Set the maxMessageSizeInKilobytes property: Represents the default maximum message size (in kilobytes) Option only available in premium tier. Default maximum in Standard tier is 256 KB, and 1 MB in premium tier. Larger message sizes are available in preview. Please see more info- Parameters:
maxMessageSizeInKilobytes
- the maxMessageSizeInKilobytes value to set.- Returns:
- the CreateTopicOptions object itself.
-