Class DefaultPollableMessageSource
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public class DefaultPollableMessageSource : AbstractPollableSource<IMessageHandler>, IPollableMessageSource, IPollableSource<IMessageHandler>, IPollableSource, ILifecycle, IRetryListener- Inheritance
- 
      
      
      DefaultPollableMessageSource
- Implements
- Inherited Members
Constructors
DefaultPollableMessageSource(IApplicationContext, ISmartMessageConverter)
public DefaultPollableMessageSource(IApplicationContext context, ISmartMessageConverter messageConverter)Parameters
- contextIApplicationContext
- messageConverterISmartMessageConverter
Properties
AttributeProvider
public Action<IAttributeAccessor, IMessage> AttributeProvider { get; set; }Property Value
ErrorChannel
public IMessageChannel ErrorChannel { get; set; }Property Value
ErrorMessageStrategy
public IErrorMessageStrategy ErrorMessageStrategy { get; set; }Property Value
IsRunning
Gets a value indicating whether gets a value indicating if its running
public bool IsRunning { get; }Property Value
RecoveryCallback
public IRecoveryCallback RecoveryCallback { get; set; }Property Value
RetryTemplate
public RetryTemplate RetryTemplate { get; set; }Property Value
Source
public IMessageSource Source { get; set; }Property Value
Methods
AddInterceptor(IChannelInterceptor)
public void AddInterceptor(IChannelInterceptor interceptor)Parameters
- interceptorIChannelInterceptor
AddInterceptor(int, IChannelInterceptor)
public void AddInterceptor(int index, IChannelInterceptor interceptor)Parameters
- indexint
- interceptorIChannelInterceptor
Close(IRetryContext, Exception)
Called after the final attempt (successful or not).
public void Close(IRetryContext context, Exception exception)Parameters
- contextIRetryContext
- the current retry context 
- exceptionException
- the last exception that was thrown during retry 
OnError(IRetryContext, Exception)
Called after every unsuccessful attempt at a retry.
public void OnError(IRetryContext context, Exception exception)Parameters
- contextIRetryContext
- the current retry context 
- exceptionException
- the last exception that was thrown during retry 
Open(IRetryContext)
Called before the first attempt in a retry.
public bool Open(IRetryContext context)Parameters
- contextIRetryContext
- the current retry context 
Returns
- bool
- true if the retry should proceed 
Poll(IMessageHandler)
Poll the consumer
public override bool Poll(IMessageHandler handler)Parameters
- handlerIMessageHandler
- the handler to process message 
Returns
- bool
- true if a message was handled 
Poll(IMessageHandler, Type)
Poll the consumer and convert the payload to the specified type. Throw a RequeueCurrentMessageException to force the current message to be requeued in the broker(after retries are exhausted, if configured).
public override bool Poll(IMessageHandler handler, Type type)Parameters
- handlerIMessageHandler
- the handler 
- typeType
- the type of the payload 
Returns
- bool
- true if a message was handled 
ShouldRequeue(Exception)
protected static bool ShouldRequeue(Exception e)Parameters
Returns
Start()
Start this component
public Task Start()Returns
- Task
- a task to signal completion 
Stop()
Stop this component
public Task Stop()Returns
- Task
- a task to signal completion