Class MessageAsyncEnumerableOptions<T>
Configuration options that is related to IAcknowledgeable messages.
public class MessageAsyncEnumerableOptions<T> : IValidatableParameterObject, IParameterObject where T : IRequest
Type Parameters
T
The type of the payload constraint to the IRequest interface.
- Inheritance
-
objectMessageAsyncEnumerableOptions<T>
- Implements
Constructors
MessageAsyncEnumerableOptions()
Initializes a new instance of the MessageAsyncEnumerableOptions<T> class.
public MessageAsyncEnumerableOptions()
Remarks
The following table shows the initial property values for an instance of MessageAsyncEnumerableOptions<T>.
Property | Initial Value |
---|---|
AcknowledgedProperties | new ConcurrentBag<IDictionary<string, object>>() |
AcknowledgedPropertiesCallback | null |
MessageCallback | null |
Properties
AcknowledgedProperties
Gets or sets the implementation of an IProducerConsumerCollection<T> that is used to store all acknowledged properties. Default is a new instance of ConcurrentBag<T>.
public IProducerConsumerCollection<IDictionary<string, object>> AcknowledgedProperties { get; set; }
Property Value
- IProducerConsumerCollection<IDictionary<string, object>>
The implementation of an IProducerConsumerCollection<T> that is used to store all acknowledged properties.
AcknowledgedPropertiesCallback
Gets or sets the delegate that is invoked at the end of a sequence with all acknowledged properties.
public Func<IEnumerable<IDictionary<string, object>>, Task> AcknowledgedPropertiesCallback { get; set; }
Property Value
- Func<IEnumerable<IDictionary<string, object>>, Task>
The delegate that is invoked at the end of a sequence with all acknowledged properties.
MessageCallback
Gets or sets the delegate that is invoked once for each message fetched from a source.
public Func<IMessage<T>, Task> MessageCallback { get; set; }
Property Value
Methods
ValidateOptions()
Determines whether the public read-write properties of this instance are in a valid state.
public void ValidateOptions()
Remarks
This method is expected to throw exceptions when one or more conditions fails to be in a valid state.