Class Consumer<TBroker, TEndpoint, TIdentifier>
Inheritance
System.Object
Consumer<TBroker, TEndpoint, TIdentifier>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.dll
Syntax
public abstract class Consumer<TBroker, TEndpoint, TIdentifier> : Consumer, IConsumer, IDisposable where TBroker : IBroker where TEndpoint : IConsumerEndpoint where TIdentifier : IBrokerMessageIdentifier
Type Parameters
Name | Description |
---|---|
TBroker | The type of the related IBroker implementation. |
TEndpoint | The type of the IConsumerEndpoint implementation used by this consumer implementation. |
TIdentifier | The type of the IBrokerMessageIdentifier used by this broker implementation. |
Constructors
| Improve this doc View sourceConsumer(TBroker, TEndpoint, IBrokerBehaviorsProvider<IConsumerBehavior>, IServiceProvider, IInboundLogger<Consumer<TBroker, TEndpoint, TIdentifier>>)
Initializes a new instance of the Consumer<TBroker, TEndpoint, TIdentifier> class.
Declaration
protected Consumer(TBroker broker, TEndpoint endpoint, IBrokerBehaviorsProvider<IConsumerBehavior> behaviorsProvider, IServiceProvider serviceProvider, IInboundLogger<Consumer<TBroker, TEndpoint, TIdentifier>> logger)
Parameters
Type | Name | Description |
---|---|---|
TBroker | broker | The IBroker that is instantiating the consumer. |
TEndpoint | endpoint | The endpoint to be consumed. |
IBrokerBehaviorsProvider<IConsumerBehavior> | behaviorsProvider | |
System.IServiceProvider | serviceProvider | The System.IServiceProvider to be used to resolve the needed services. |
IInboundLogger<Consumer<TBroker, TEndpoint, TIdentifier>> | logger |
Properties
| Improve this doc View sourceBroker
Gets the IBroker that owns this consumer.
Declaration
public TBroker Broker { get; }
Property Value
Type | Description |
---|---|
TBroker |
Endpoint
Gets the IConsumerEndpoint representing the endpoint that is being consumed.
Declaration
public TEndpoint Endpoint { get; }
Property Value
Type | Description |
---|---|
TEndpoint |
Methods
| Improve this doc View sourceCommitCoreAsync(IReadOnlyCollection<TIdentifier>)
Declaration
protected abstract Task CommitCoreAsync(IReadOnlyCollection<TIdentifier> brokerMessageIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<TIdentifier> | brokerMessageIdentifiers |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
CommitCoreAsync(IReadOnlyCollection<IBrokerMessageIdentifier>)
Declaration
protected override Task CommitCoreAsync(IReadOnlyCollection<IBrokerMessageIdentifier> brokerMessageIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<IBrokerMessageIdentifier> | brokerMessageIdentifiers |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
| Improve this doc View sourceRollbackCoreAsync(IReadOnlyCollection<TIdentifier>)
Declaration
protected abstract Task RollbackCoreAsync(IReadOnlyCollection<TIdentifier> brokerMessageIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<TIdentifier> | brokerMessageIdentifiers |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RollbackCoreAsync(IReadOnlyCollection<IBrokerMessageIdentifier>)
Declaration
protected override Task RollbackCoreAsync(IReadOnlyCollection<IBrokerMessageIdentifier> brokerMessageIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<IBrokerMessageIdentifier> | brokerMessageIdentifiers |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Implements
System.IDisposable