IPlaybackControl 接口

定义

“消息队列”传送机制的服务器端播放错误和客户端失败的异常处理中的“排队组件”中的函数。Functions in Queued Components in the abnormal handling of server-side playback errors and client-side failures of the Message Queuing delivery mechanism.

public interface class IPlaybackControl
[System.Runtime.InteropServices.Guid("51372AFD-CAE7-11CF-BE81-00AA00A2FA25")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IPlaybackControl
type IPlaybackControl = interface
Public Interface IPlaybackControl
属性

注解

在 com + 目录中为组件定义的 exception 类实现IPlaybackControl了和原始类的接口。The exception class defined for the component in the COM+ catalog implements both IPlaybackControl and the interface for the original class. 原始类接口的方法实现用于对类本身中失败的方法执行异常处理。The method implementations of the original class interface are used to perform the exception handling for the failed methods in the class itself. 它们将在或FinalClientRetry FinalServerRetry之后调用, 以处理最初调用的方法的异常。They will be called after FinalClientRetry or FinalServerRetry to process exceptions for the method originally called.

排队的组件扮演者调用的方法IPlaybackControl来通知异常处理程序对象, 消息将要放置在最终的静止或死信队列中。The Queued Components Player calls the methods of IPlaybackControl to inform the exception-handler object that a message is about to be placed on the final resting or dead letter queue. 然后, 排队组件扮演者会在原始方法调用失败的异常处理程序对象中调用相同的方法。The Queued Components Player then calls the same method in the exception-handler object that had failed in the original method call. 异常处理程序对象可以实现一种替代方法, 例如, 收集问题诊断信息, 或生成通知客户端问题的对象或消息。The exception-handler object can implement an alternative, for example, by gathering problem diagnosis information or generating an object or message that informs the client of the problem. 如果应用程序未实现IPlaybackControl, 则当排队组件播放机用完所有重试时, 病毒消息会被放置在最终的静止或死信队列中。If the application does not implement IPlaybackControl, the poison message is placed on the final resting or dead letter queue when the Queued Components Player exhausts all retries.

病毒消息是由于某些原因而无法处理的消息, 可能是因为服务器或队列系统有问题。A poison message is a message that cannot be processed for some reason, perhaps because of a problem with the server or queuing system. 事务被回滚, 病毒消息将进入队列的顶部。The transaction is rolled back, and the poison message goes to the top of the queue. 当消息再次取消排队时, 将发生相同的情况。When the message is dequeued again, the same condition occurs. 此消息可能会无限期地继续循环, 直到完成纠正此问题所需的操作。This message can continue looping indefinitely until something is done to correct the problem. 排队组件服务通过使用一系列重试来处理病毒消息。The Queued Components service handles the poison message by using a series of retries. 重试多次失败后, 会将消息移动到最终的静止队列。After several unsuccessful retries, the message is moved to a final resting queue. 病毒消息将保留在静止队列中, 直到使用排队组件消息移动器工具手动移动。Poison messages remain in the resting queue until manually moved by using the Queued Components Message Mover tool.

也可以使用FinalServerRetry方法以编程方式解析病毒消息的情况, 这会通知服务器端组件作者所有尝试播放延迟激活的尝试都已失败。The poison message situation can also be resolved programmatically, using the FinalServerRetry method, which informs the server-side component author that all attempts to play back the deferred activation have failed.

如果发现病毒消息, 则可以快速解决问题的根本原因。If you discover a poison message, you might be able to solve the underlying cause of the problem quickly. 例如, 如果由于某种原因而使服务器脱机, 则可以将服务器恢复联机状态。For example, if the server was offline for some reason, you can bring the server back online. 如果无法快速解决问题, 则可以自动生成另一个事务, 通知请求者未发生事务。If you cannot solve the problem quickly, you can automatically generate another transaction that notifies the requestor that the transaction did not occur. 然后, 请求者可以进行补偿事务, 以反转已提交的事务的效果。The requestor can then make a compensating transaction that reverses the effect of a transaction that has already committed.

方法

FinalClientRetry()

通知客户端异常处理组件,消息队列将消息发送至服务器的所有尝试均被拒绝,消息终止于客户端的 Xact 死信队列。Informs the client-side exception-handling component that all Message Queuing attempts to deliver the message to the server were rejected, and the message ended up on the client-side Xact Dead Letter queue.

FinalServerRetry()

通知服务器端异常类实现,所有将被推迟的激活播放至服务器的尝试均已失败,该消息将被移至其最终静止队列。Informs the server-side exception class implementation that all attempts to play back the deferred activation to the server have failed, and the message is about to be moved to its final resting queue.

适用于