public class SubscriptionDescription extends Object
Constructor and Description |
---|
SubscriptionDescription(String topicPath,
String subscriptionName)
Initializes a new instance of SubscriptionDescription with the specified relative path.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Duration |
getAutoDeleteOnIdle() |
Duration |
getDefaultMessageTimeToLive()
Time-To-Live is the duration after which the message expires, starting from when
the message is sent to Service Bus.
|
EntityStatus |
getEntityStatus()
Gets the status of the entity.
|
String |
getForwardDeadLetteredMessagesTo() |
String |
getForwardTo() |
Duration |
getLockDuration()
The amount of time that the message is locked by a given receiver
so that no other receiver receives the same message.
|
int |
getMaxDeliveryCount()
The maximum delivery count of a message before it is dead-lettered.
|
String |
getPath() |
String |
getSubscriptionName() |
String |
getTopicPath() |
String |
getUserMetadata() |
int |
hashCode() |
boolean |
isEnableBatchedOperations() |
boolean |
isEnableDeadLetteringOnFilterEvaluationException() |
boolean |
isEnableDeadLetteringOnMessageExpiration()
Indicates whether this subscription has dead letter support when a message expires.
|
boolean |
isRequiresSession() |
void |
setAutoDeleteOnIdle(Duration autoDeleteOnIdle) |
void |
setDefaultMessageTimeToLive(Duration defaultMessageTimeToLive) |
void |
setEnableBatchedOperations(boolean enableBatchedOperations) |
void |
setEnableDeadLetteringOnFilterEvaluationException(boolean enableDeadLetteringOnFilterEvaluationException) |
void |
setEnableDeadLetteringOnMessageExpiration(boolean enableDeadLetteringOnMessageExpiration) |
void |
setEntityStatus(EntityStatus status) |
void |
setForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo) |
void |
setForwardTo(String forwardTo) |
void |
setLockDuration(Duration lockDuration)
Sets The amount of time that the message is locked by a given receiver
so that no other receiver receives the same message.
|
void |
setMaxDeliveryCount(int maxDeliveryCount)
The maximum delivery count of a message before it is dead-lettered.
|
void |
setRequiresSession(boolean requiresSession) |
void |
setUserMetadata(String userMetadata) |
public SubscriptionDescription(String topicPath, String subscriptionName)
topicPath
- - Path of the topic
Max length is 260 chars. Cannot start or end with a slash.
Cannot have restricted characters: '@','?','#','*'subscriptionName
- - Name of the subscription
Max length is 50 chars. Cannot have restricted characters: '@','?','#','*','/'public String getTopicPath()
public String getSubscriptionName()
public String getPath()
public Duration getLockDuration()
public void setLockDuration(Duration lockDuration)
lockDuration
- - The duration of a peek lock. Max value is 5 minutes.public boolean isRequiresSession()
public void setRequiresSession(boolean requiresSession)
requiresSession
- - Set to true if subscription should support sessions.public Duration getDefaultMessageTimeToLive()
IMessage.getTimeToLive()
is not set on a message itself.
Messages older than their TimeToLive value will expire and no longer be retained in the message store.
Subscribers will be unable to receive expired messages.ManagementClientConstants.MAX_DURATION
public void setDefaultMessageTimeToLive(Duration defaultMessageTimeToLive)
defaultMessageTimeToLive
- - Sets the default message time to live value.
Value cannot be lower than 1 second.
See getDefaultMessageTimeToLive()
public Duration getAutoDeleteOnIdle()
ManagementClientConstants.MAX_DURATION
public void setAutoDeleteOnIdle(Duration autoDeleteOnIdle)
autoDeleteOnIdle
- - The idle interval after which the subscription is automatically deleted.
The minimum duration is 5 minutes.public boolean isEnableDeadLetteringOnMessageExpiration()
public void setEnableDeadLetteringOnMessageExpiration(boolean enableDeadLetteringOnMessageExpiration)
enableDeadLetteringOnMessageExpiration
- - True if messages should be dead-lettered on expiration.
See isEnableDeadLetteringOnMessageExpiration()
public boolean isEnableDeadLetteringOnFilterEvaluationException()
public void setEnableDeadLetteringOnFilterEvaluationException(boolean enableDeadLetteringOnFilterEvaluationException)
enableDeadLetteringOnFilterEvaluationException
- - True if messages should be dead-lettered on filter evaluation exception.
See isEnableDeadLetteringOnFilterEvaluationException()
public int getMaxDeliveryCount()
ReceiveMode.PEEKLOCK
mode
and didn't complete the message before the message lock expired.public void setMaxDeliveryCount(int maxDeliveryCount)
ReceiveMode.PEEKLOCK
mode
and didn't complete the message before the message lock expired.maxDeliveryCount
- - Minimum value is 1.public boolean isEnableBatchedOperations()
public void setEnableBatchedOperations(boolean enableBatchedOperations)
enableBatchedOperations
- - Indicates whether server-side batched operations are enabled.public EntityStatus getEntityStatus()
public void setEntityStatus(EntityStatus status)
status
- - the status of the queue (Enabled / Disabled).
When an entity is disabled, that entity cannot send or receive messages.public String getForwardTo()
public void setForwardTo(String forwardTo)
forwardTo
- - The path of the recipient entity to which all the messages sent to the subscription are forwarded to.
If set, user cannot manually receive messages from this subscription. The destination entity
must be an already existing entity.public String getForwardDeadLetteredMessagesTo()
public void setForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo)
forwardDeadLetteredMessagesTo
- - The path of the recipient entity to which all the dead-lettered messages of this subscription are forwarded to.
If set, user cannot manually receive dead-lettered messages from this subscription. The destination
entity must already exist.public String getUserMetadata()
public void setUserMetadata(String userMetadata)
userMetadata
- - Custom metdata that user can associate with the description.
Cannot be null. Max length is 1024 charsCopyright © 2019 Microsoft Corporation. All rights reserved.