Class DeadLetterOptions
java.lang.Object
com.azure.messaging.servicebus.models.DeadLetterOptions
Options to specify when sending a
message received via
ServiceBusReceiveMode.PEEK_LOCK to the
dead-letter queue
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of options to specify when sending messages to the dead-letter queue (DLQ). -
Method Summary
Modifier and TypeMethodDescriptionGets the error description for putting put message in dead letter sub-queue.Gets the reason for putting put message in dead letter sub-queue.Gets the message properties to modify while putting put message in dead letter sub-queue.Gets the transaction associated with the settlement operation.setDeadLetterErrorDescription(String deadLetterErrorDescription) Sets the error description while putting message in dead letter sub-queue.setDeadLetterReason(String deadLetterReason) Sets the reason while putting message in dead letter sub-queue.setPropertiesToModify(Map<String, Object> propertiesToModify) Sets the message properties to modify while putting message in dead letter sub-queue.setTransactionContext(ServiceBusTransactionContext transactionContext) Sets theServiceBusTransactionContextto the options.
-
Constructor Details
-
DeadLetterOptions
public DeadLetterOptions()Creates a new instance of options to specify when sending messages to the dead-letter queue (DLQ).
-
-
Method Details
-
setDeadLetterReason
Sets the reason while putting message in dead letter sub-queue.- Parameters:
deadLetterReason- while putting message in dead letter sub-queue.- Returns:
- The updated
DeadLetterOptionsobject.
-
setDeadLetterErrorDescription
Sets the error description while putting message in dead letter sub-queue.- Parameters:
deadLetterErrorDescription- while putting message in dead letter sub-queue.- Returns:
- The updated
DeadLetterOptionsobject.
-
setPropertiesToModify
Sets the message properties to modify while putting message in dead letter sub-queue.- Parameters:
propertiesToModify- Message properties to modify.- Returns:
- The updated
DeadLetterOptionsobject.
-
getDeadLetterReason
Gets the reason for putting put message in dead letter sub-queue.- Returns:
- The reason for putting put message in dead letter sub-queue.
-
getDeadLetterErrorDescription
Gets the error description for putting put message in dead letter sub-queue.- Returns:
- The error description to for putting message in dead letter sub-queue.
-
getPropertiesToModify
-
setTransactionContext
Sets theServiceBusTransactionContextto the options.- Parameters:
transactionContext- TheServiceBusTransactionContextthat will be used to dead letter a message.- Returns:
- The updated
DeadLetterOptionsobject. - See Also:
-
getTransactionContext
Gets the transaction associated with the settlement operation.- Returns:
- The transaction context associated with the settlement operation.
nullif there is none.
-