Delen via


CreateSubscriptionOptions Class

  • java.lang.Object
    • com.azure.messaging.servicebus.administration.models.CreateSubscriptionOptions

public final class CreateSubscriptionOptions

Options to set when creating a subscription.

Constructor Summary

Constructor Description
CreateSubscriptionOptions()

Creates an instance.

CreateSubscriptionOptions(SubscriptionProperties subscription)

Initializes a new instance based on the specified SubscriptionProperties instance.

Method Summary

Modifier and Type Method and Description
Duration getAutoDeleteOnIdle()

Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the subscription is automatically deleted.

Duration getDefaultMessageTimeToLive()

Get the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value.

RuleProperties getDefaultRule()

Get the rule that the subscription was created with, if any.

String getForwardDeadLetteredMessagesTo()

Get the forwardDeadLetteredMessagesTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

String getForwardTo()

Get the forwardTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

Duration getLockDuration()

Get the lockDuration property: ISO 8601 time-span duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.

int getMaxDeliveryCount()

Get the maxDeliveryCount property: The maximum delivery count.

EntityStatus getStatus()

Get the status property: Status of a Service Bus resource.

String getUserMetadata()

Get the userMetadata property: Metadata associated with the subscription.

boolean isBatchedOperationsEnabled()

Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.

boolean isDeadLetteringOnFilterEvaluationExceptions()

Get the deadLetteringOnFilterEvaluationExceptions property: A value that indicates whether this subscription has dead letter support when a message expires.

boolean isDeadLetteringOnMessageExpiration()

Get the deadLetteringOnMessageExpiration property: A value that indicates whether this subscription has dead letter support when a message expires.

boolean isSessionRequired()

Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions.

CreateSubscriptionOptions setAutoDeleteOnIdle(Duration autoDeleteOnIdle)

Set the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the subscription is automatically deleted.

CreateSubscriptionOptions setBatchedOperationsEnabled(boolean enableBatchedOperations)

Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.

CreateSubscriptionOptions setDeadLetteringOnMessageExpiration(boolean deadLetteringOnMessageExpiration)

Set the deadLetteringOnMessageExpiration property: A value that indicates whether this subscription has dead letter support when a message expires.

CreateSubscriptionOptions setDefaultMessageTimeToLive(Duration defaultMessageTimeToLive)

Set the defaultMessageTimeToLive property: ISO 8601 default message timespan to live value.

CreateSubscriptionOptions setDefaultRule(RuleProperties ruleProperties)

Set the rule that the subscriptions should be created with, if any.

CreateSubscriptionOptions setEnableDeadLetteringOnFilterEvaluationExceptions(boolean deadLetteringOnFilterEvaluationExceptions)

Set the deadLetteringOnFilterEvaluationExceptions property: A value that indicates whether this subscription has dead letter support when a message expires.

CreateSubscriptionOptions setForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo)

Set the forwardDeadLetteredMessagesTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

CreateSubscriptionOptions setForwardTo(String forwardTo)

Set the forwardTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

CreateSubscriptionOptions setLockDuration(Duration lockDuration)

Set the lockDuration property: ISO 8601 time-span duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.

CreateSubscriptionOptions setMaxDeliveryCount(int maxDeliveryCount)

Set the maxDeliveryCount property: The maximum delivery count.

CreateSubscriptionOptions setSessionRequired(boolean requiresSession)

Set the requiresSession property: A value that indicates whether the queue supports the concept of sessions.

CreateSubscriptionOptions setStatus(EntityStatus status)

Set the status property: Status of a Service Bus resource.

CreateSubscriptionOptions setUserMetadata(String userMetadata)

Set the userMetadata property: Metadata associated with the subscription.

Methods inherited from java.lang.Object

Constructor Details

CreateSubscriptionOptions

public CreateSubscriptionOptions(SubscriptionProperties subscription)

Initializes a new instance based on the specified SubscriptionProperties instance. This is useful for creating a new subscription based on the properties of an existing subscription.

Parameters:

subscription - Existing subscription to create options with.

Method Details

getAutoDeleteOnIdle

public Duration getAutoDeleteOnIdle()

Get the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

Returns:

the autoDeleteOnIdle value.

getDefaultMessageTimeToLive

public Duration 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.

getDefaultRule

public RuleProperties getDefaultRule()

Get the rule that the subscription was created with, if any.

Returns:

the Rule description

getForwardDeadLetteredMessagesTo

public String getForwardDeadLetteredMessagesTo()

Get the forwardDeadLetteredMessagesTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

Returns:

the forwardDeadLetteredMessagesTo value.

getForwardTo

public String getForwardTo()

Get the forwardTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

Returns:

the forwardTo value.

getLockDuration

public Duration getLockDuration()

Get the lockDuration property: ISO 8601 time-span 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.

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.

getStatus

public EntityStatus getStatus()

Get the status property: Status of a Service Bus resource.

Returns:

the status value.

getUserMetadata

public String getUserMetadata()

Get the userMetadata property: Metadata associated with the subscription. Maximum number of characters is 1024.

Returns:

the userMetadata value.

isBatchedOperationsEnabled

public boolean isBatchedOperationsEnabled()

Get the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.

Returns:

the enableBatchedOperations value.

isDeadLetteringOnFilterEvaluationExceptions

public boolean isDeadLetteringOnFilterEvaluationExceptions()

Get the deadLetteringOnFilterEvaluationExceptions property: A value that indicates whether this subscription has dead letter support when a message expires.

Returns:

the deadLetteringOnFilterEvaluationExceptions value.

isDeadLetteringOnMessageExpiration

public boolean isDeadLetteringOnMessageExpiration()

Get the deadLetteringOnMessageExpiration property: A value that indicates whether this subscription has dead letter support when a message expires.

Returns:

the deadLetteringOnMessageExpiration value.

isSessionRequired

public boolean isSessionRequired()

Get the requiresSession property: A value that indicates whether the queue supports the concept of sessions.

Returns:

the requiresSession value.

setAutoDeleteOnIdle

public CreateSubscriptionOptions setAutoDeleteOnIdle(Duration autoDeleteOnIdle)

Set the autoDeleteOnIdle property: ISO 8601 timeSpan idle interval after which the subscription is automatically deleted. The minimum duration is 5 minutes.

Parameters:

autoDeleteOnIdle - the autoDeleteOnIdle value to set.

Returns:

the CreateSubscriptionOptions object itself.

setBatchedOperationsEnabled

public CreateSubscriptionOptions setBatchedOperationsEnabled(boolean enableBatchedOperations)

Set the enableBatchedOperations property: Value that indicates whether server-side batched operations are enabled.

Parameters:

enableBatchedOperations - the enableBatchedOperations value to set.

Returns:

the CreateSubscriptionOptions object itself.

setDeadLetteringOnMessageExpiration

public CreateSubscriptionOptions setDeadLetteringOnMessageExpiration(boolean deadLetteringOnMessageExpiration)

Set the deadLetteringOnMessageExpiration property: A value that indicates whether this subscription has dead letter support when a message expires.

Parameters:

deadLetteringOnMessageExpiration - the deadLetteringOnMessageExpiration value to set.

Returns:

the CreateSubscriptionOptions object itself.

setDefaultMessageTimeToLive

public CreateSubscriptionOptions setDefaultMessageTimeToLive(Duration defaultMessageTimeToLive)

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 CreateSubscriptionOptions object itself.

setDefaultRule

public CreateSubscriptionOptions setDefaultRule(RuleProperties ruleProperties)

Set the rule that the subscriptions should be created with, if any.

Parameters:

ruleProperties - the rule description (name, action, filter)

Returns:

the CreateSubscriptionOptions object itself.

setEnableDeadLetteringOnFilterEvaluationExceptions

public CreateSubscriptionOptions setEnableDeadLetteringOnFilterEvaluationExceptions(boolean deadLetteringOnFilterEvaluationExceptions)

Set the deadLetteringOnFilterEvaluationExceptions property: A value that indicates whether this subscription has dead letter support when a message expires.

Parameters:

deadLetteringOnFilterEvaluationExceptions - the deadLetteringOnFilterEvaluationExceptions value to set.

Returns:

the CreateSubscriptionOptions object itself.

setForwardDeadLetteredMessagesTo

public CreateSubscriptionOptions setForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo)

Set the forwardDeadLetteredMessagesTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

Parameters:

forwardDeadLetteredMessagesTo - the forwardDeadLetteredMessagesTo value to set.

Returns:

the CreateSubscriptionOptions object itself.

setForwardTo

public CreateSubscriptionOptions setForwardTo(String forwardTo)

Set the forwardTo property: The name of the recipient entity to which all the messages sent to the subscription are forwarded to.

Parameters:

forwardTo - the forwardTo value to set.

Returns:

the CreateSubscriptionOptions object itself.

setLockDuration

public CreateSubscriptionOptions setLockDuration(Duration lockDuration)

Set the lockDuration property: ISO 8601 time-span 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 CreateSubscriptionOptions object itself.

setMaxDeliveryCount

public CreateSubscriptionOptions setMaxDeliveryCount(int maxDeliveryCount)

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 CreateSubscriptionOptions object itself.

setSessionRequired

public CreateSubscriptionOptions setSessionRequired(boolean requiresSession)

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 CreateSubscriptionOptions object itself.

setStatus

public CreateSubscriptionOptions setStatus(EntityStatus status)

Set the status property: Status of a Service Bus resource.

Parameters:

status - the status value to set.

Returns:

the CreateSubscriptionOptions object itself.

setUserMetadata

public CreateSubscriptionOptions setUserMetadata(String userMetadata)

Set the userMetadata property: Metadata associated with the subscription. Maximum number of characters is 1024.

Parameters:

userMetadata - the userMetadata value to set.

Returns:

the CreateSubscriptionOptions object itself.

Applies to