Interface IMessagingBehaviorBinding
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Behaviors.Messaging.Abstractions
Assembly: Cephalon.Behaviors.Messaging.dll
Adapts a messaging transport to the ABT behavior dispatcher.
Each transport variant (InMemory, RabbitMQ, Kafka, etc.) implements this interface
and is registered in the
public interface IMessagingBehaviorBindingProperties
Section titled “Properties”TransportId
Section titled “ TransportId”Gets the canonical transport identifier (e.g. “rabbitmq”, “kafka”, “in-memory”).
string TransportId { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”StartAsync(BehaviorTopologyDescriptor, BehaviorDispatcher, CancellationToken)
Section titled “ StartAsync(BehaviorTopologyDescriptor, BehaviorDispatcher, CancellationToken)”Starts consuming messages for the given behavior topology and dispatches them. Called once per descriptor per transport; implementations should be idempotent.
Task StartAsync(BehaviorTopologyDescriptor descriptor, BehaviorDispatcher dispatcher, CancellationToken ct)Parameters
Section titled “Parameters”descriptor BehaviorTopologyDescriptor
The behavior topology descriptor.
dispatcher BehaviorDispatcher
The behavior dispatcher to invoke for each received message.
A token that signals when the host is shutting down.
Returns
Section titled “Returns”A task that completes when the binding is fully started.
StopAsync(CancellationToken)
Section titled “ StopAsync(CancellationToken)”Stops the binding and releases transport resources.
Task StopAsync(CancellationToken ct)Parameters
Section titled “Parameters”A token that cancels the graceful-stop wait.
Returns
Section titled “Returns”A task that completes when the binding has fully stopped.