Table of Contents

Class CachingConnectionFactory

Namespace
Steeltoe.Messaging.RabbitMQ.Connection
Assembly
Steeltoe.Messaging.RabbitMQ.dll
public class CachingConnectionFactory : AbstractConnectionFactory, IConnectionFactory, IDisposable, IServiceNameAware, IShutdownListener
Inheritance
CachingConnectionFactory
Implements
Inherited Members

Constructors

CachingConnectionFactory(ILoggerFactory)

public CachingConnectionFactory(ILoggerFactory loggerFactory = null)

Parameters

loggerFactory ILoggerFactory

CachingConnectionFactory(IOptionsMonitor<RabbitOptions>, ILoggerFactory)

[ActivatorUtilitiesConstructor]
public CachingConnectionFactory(IOptionsMonitor<RabbitOptions> optionsMonitor, ILoggerFactory loggerFactory = null)

Parameters

optionsMonitor IOptionsMonitor<RabbitOptions>
loggerFactory ILoggerFactory

CachingConnectionFactory(IConnectionFactory, ILoggerFactory)

protected CachingConnectionFactory(IConnectionFactory rabbitConnectionFactory, ILoggerFactory loggerFactory = null)

Parameters

rabbitConnectionFactory IConnectionFactory
loggerFactory ILoggerFactory

CachingConnectionFactory(IConnectionFactory, bool, CachingMode, ILoggerFactory)

protected CachingConnectionFactory(IConnectionFactory rabbitConnectionFactory, bool isPublisherFactory, CachingConnectionFactory.CachingMode cachingMode = CachingMode.CHANNEL, ILoggerFactory loggerFactory = null)

Parameters

rabbitConnectionFactory IConnectionFactory
isPublisherFactory bool
cachingMode CachingConnectionFactory.CachingMode
loggerFactory ILoggerFactory

CachingConnectionFactory(int, ILoggerFactory)

public CachingConnectionFactory(int port, ILoggerFactory loggerFactory = null)

Parameters

port int
loggerFactory ILoggerFactory

CachingConnectionFactory(string, ILoggerFactory)

public CachingConnectionFactory(string hostname, ILoggerFactory loggerFactory = null)

Parameters

hostname string
loggerFactory ILoggerFactory

CachingConnectionFactory(string, int, ILoggerFactory)

public CachingConnectionFactory(string hostNameArg, int port, ILoggerFactory loggerFactory = null)

Parameters

hostNameArg string
port int
loggerFactory ILoggerFactory

CachingConnectionFactory(string, int, IConnectionFactory, ILoggerFactory)

public CachingConnectionFactory(string hostNameArg, int port, IConnectionFactory connectionFactory, ILoggerFactory loggerFactory = null)

Parameters

hostNameArg string
port int
connectionFactory IConnectionFactory
loggerFactory ILoggerFactory

CachingConnectionFactory(Uri, ILoggerFactory)

public CachingConnectionFactory(Uri uri, ILoggerFactory loggerFactory = null)

Parameters

uri Uri
loggerFactory ILoggerFactory

CachingConnectionFactory(Uri, CachingMode, ILoggerFactory)

public CachingConnectionFactory(Uri uri, CachingConnectionFactory.CachingMode cachingMode = CachingMode.CHANNEL, ILoggerFactory loggerFactory = null)

Parameters

uri Uri
cachingMode CachingConnectionFactory.CachingMode
loggerFactory ILoggerFactory

Fields

DEFAULT_SERVICE_NAME

public const string DEFAULT_SERVICE_NAME = "ccFactory"

Field Value

string

Properties

CacheMode

public CachingConnectionFactory.CachingMode CacheMode { get; set; }

Property Value

CachingConnectionFactory.CachingMode

ChannelCacheSize

public int ChannelCacheSize { get; set; }

Property Value

int

ChannelCheckoutTimeout

public int ChannelCheckoutTimeout { get; set; }

Property Value

int

CloseExceptionLogger

public IConditionalExceptionLogger CloseExceptionLogger { get; set; }

Property Value

IConditionalExceptionLogger

ConnectionCacheSize

public int ConnectionCacheSize { get; set; }

Property Value

int

ConnectionLimit

public int ConnectionLimit { get; set; }

Property Value

int

IsPublisherConfirms

Gets a value indicating whether if publisher confirms are enabled

public override bool IsPublisherConfirms { get; }

Property Value

bool

IsPublisherReturns

Gets a value indicating whether if publisher returns are enabled

public override bool IsPublisherReturns { get; set; }

Property Value

bool

IsSimplePublisherConfirms

Gets a value indicating whether if simple publisher confirms are enabled

public override bool IsSimplePublisherConfirms { get; }

Property Value

bool

Options

protected RabbitOptions Options { get; }

Property Value

RabbitOptions

PublisherCachingConnectionFactory

public CachingConnectionFactory PublisherCachingConnectionFactory { get; set; }

Property Value

CachingConnectionFactory

PublisherCallbackChannelFactory

public IPublisherCallbackChannelFactory PublisherCallbackChannelFactory { get; set; }

Property Value

IPublisherCallbackChannelFactory

PublisherConfirmType

public CachingConnectionFactory.ConfirmType PublisherConfirmType { get; set; }

Property Value

CachingConnectionFactory.ConfirmType

Methods

AddConnectionListener(IConnectionListener)

Add a connection listener to this factory

public override void AddConnectionListener(IConnectionListener connectionListener)

Parameters

connectionListener IConnectionListener

the listener to add

ChannelShutdownCompleted(object, ShutdownEventArgs)

public void ChannelShutdownCompleted(object sender, ShutdownEventArgs args)

Parameters

sender object
args ShutdownEventArgs

CloseAndClear(LinkedList<IChannelProxy>)

protected void CloseAndClear(LinkedList<IChannelProxy> theChannels)

Parameters

theChannels LinkedList<IChannelProxy>

CloseChannels(ICollection<IChannelProxy>)

protected void CloseChannels(ICollection<IChannelProxy> theChannels)

Parameters

theChannels ICollection<IChannelProxy>

CreateConnection()

Create a connection

public override IConnection CreateConnection()

Returns

IConnection

the connection if successful

Destroy()

Close underlying shared connection. The factory is still able to create new connections after this call

public override void Destroy()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

GetCacheProperties()

public IDictionary<string, object> GetCacheProperties()

Returns

IDictionary<string, object>

Reset(LinkedList<IChannelProxy>, LinkedList<IChannelProxy>, Dictionary<IModel, IChannelProxy>)

protected void Reset(LinkedList<IChannelProxy> channels, LinkedList<IChannelProxy> txChannels, Dictionary<IModel, IChannelProxy> channelsAwaitingAcks)

Parameters

channels LinkedList<IChannelProxy>
txChannels LinkedList<IChannelProxy>
channelsAwaitingAcks Dictionary<IModel, IChannelProxy>

ResetConnection()

public void ResetConnection()

SetConnectionListeners(List<IConnectionListener>)

public override void SetConnectionListeners(List<IConnectionListener> listeners)

Parameters

listeners List<IConnectionListener>