- ChannelMapper
- AddDefaultPublishMap(mapFunction)
- AddDefaultPublishSubscriptionMap(mapFunction)
- AddDefaultQueryMap(mapFunction)
- AddDefaultQueryResponseMap(mapFunction)
- AddDefaultQuerySubscriptionMap(mapFunction)
- AddPublishMap(originalChannel,newChannel)
- AddPublishMap(originalChannel,mapFunction)
- AddPublishMap(isMatch,mapFunction)
- AddPublishSubscriptionMap(originalChannel,newChannel)
- AddPublishSubscriptionMap(originalChannel,mapFunction)
- AddPublishSubscriptionMap(isMatch,mapFunction)
- AddQueryMap(originalChannel,newChannel)
- AddQueryMap(originalChannel,mapFunction)
- AddQueryMap(isMatch,mapFunction)
- AddQueryResponseMap(originalChannel,newChannel)
- AddQueryResponseMap(originalChannel,mapFunction)
- AddQueryResponseMap(isMatch,mapFunction)
- AddQuerySubscriptionMap(originalChannel,newChannel)
- AddQuerySubscriptionMap(originalChannel,mapFunction)
- AddQuerySubscriptionMap(isMatch,mapFunction)
- ConsumerRegistrationFailedException
- Consuming
- ContractConnection
- Instance(serviceConnection,defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper)
- MappedServiceInstance(defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper)
- MultiServiceInstance(defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper)
- DynamicCodeNotSupportedException
- EventIds
- InvalidConsumerTypeException
- InvalidMiddlewareException
- InvalidPolicyArgumentsException
- InvalidQueryResponseMessageReceivedException
- InvalidRetryCircuitBreakTriggersException
- Lifetime
- ClosingAllInboxes
- ClosingConnection
- ConstructingQueryResponseSubscription
- ConsumerRegistrationFailed
- CreatingPubSubSubscription
- CreatingQueryResponseSubscription
- DisposingQueryResponseSubscription
- EnablingMetricMiddleware
- EndingSubscription
- EstablishingInboxSubscription
- EstablishingNewInboxSubscription
- EstablishingPubSubServiceSubscription
- EstablishingPubSubServiceSubscriptionSucceeded
- EstablishingPubSubSubscription
- EstablishingQueryResponseServiceSubscription
- EstablishingQueryResponseSubscription
- EstablishingQueryResponseSubscriptionServiceSubscription
- EstablishingQueryResponseSubscriptionWithPubSubServiceSubscription
- PubSubSubscriptionEstablishmentFailed
- QueryResponseSubscriptionDisposed
- QueryResponseSubscriptionEstablishmentFailed
- QueryResponseSubscriptionEstablishmentFailedWithError
- QueryResponseSubscriptionEstablishmentSucceeded
- RegisteringMiddleware
- SettingUpInboxSubscription
- MessageChannelNullException
- MessageConversionException
- NoConnectionMatchException
- PingNotSupportedException
- Pipeline
- AttemptingToProcessInboxMessage
- DecodingServiceMessage
- ExecutingAfterMessageDecodeMiddleware
- ExecutingAfterMessageEncodeMiddleware
- ExecutingBeforeMessageDecodeMiddleware
- ExecutingBeforeMessageEncodeMiddleware
- ExecutingSpecificAfterMessageDecodeMiddleware
- ExecutingSpecificBeforeMessageEncodeMiddleware
- ExtractingQueryResponseType
- FilterServiceMessageInFull
- FilteringServiceMessageByHeaders
- ProcessingQueryResponse
- ProcessingQueryResponseFailed
- ProducingServiceMessage
- QueryReplyChannelMapped
- ReceivedInvalidQueryResponseMessage
- ResilienceFailedToFallback
- ResilienceRetryTriggered
- Publishing
- AttemptingQueryResponse
- AttemptingQueryResponseOnPubSubService
- BulkPublishingMessages
- ExecutingBulkPublish
- ExecutingQuery
- ExecutingQueryResponseOnInboxService
- ExecutingQueryResponseOnPubSubService
- ExecutingQueryResponseOnQueryResponseService
- InboxQueryTimedOut
- PubSubQueryResponseRecieved
- PublishingMessage
- QueryExceptionOccured
- StartingQueryResponsePubSubListener
- TransmittingInboxQuery
- TransmittingInboxQueryFailed
- TransmittingPubSubQuery
- TransmittingPubSubQueryFailed
- WaitingOnPubSubQueryResponse
- QueryExecutionFailedException
- QueryResponseException
- QueryTimeoutException
- SubscriptionFailedException
- TooManyConnectionMatchesException
- Transport
- UnknownResponseTypeException
MQContract
Used to map channel names depending on the usage of the channel when necessary
Add a default map function to call for publish calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a default map function to call for pub/sub subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a default map function to call for query calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a default map function to call for query/response response calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a default map function to call for query/response subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a direct map for publish calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| newChannel | System.String | The channel to map it to |
Add a map function for publish calls for a given channel
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a map function call pair for publish calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| isMatch | System.Func{System.String,System.Boolean} | A callback that will return true if the supplied function will mape that channel |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a direct map for pub/sub subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| newChannel | System.String | The channel to map it to |
Add a map function for pub/sub subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a map function call pair for pub/sub subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| isMatch | System.Func{System.String,System.Boolean} | A callback that will return true if the supplied function will mape that channel |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a direct map for query calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| newChannel | System.String | The channel to map it to |
Add a map function for query calls for a given channel
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a map function call pair for query calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| isMatch | System.Func{System.String,System.Boolean} | A callback that will return true if the supplied function will mape that channel |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a direct map for query/response response calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| newChannel | System.String | The channel to map it to |
Add a map function for query/response response calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a map function call pair for query/response response calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| isMatch | System.Func{System.String,System.Boolean} | A callback that will return true if the supplied function will mape that channel |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a direct map for query/response subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| newChannel | System.String | The channel to map it to |
Add a map function for query/response subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| originalChannel | System.String | The original channel that is being used in the connection |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
Add a map function call pair for query/response subscription calls
The current instance of the Channel Mapper
| Name | Type | Description |
|---|---|---|
| isMatch | System.Func{System.String,System.Boolean} | A callback that will return true if the supplied function will mape that channel |
| mapFunction | System.Func{System.String,System.Threading.Tasks.ValueTask{System.String}} | A function to be called with the channel supplied expecting a mapped channel name |
MQContract
Thrown when the registration of a consumer failes
MQContract.Logging.EventIds
Consumer related event id values. Covers processing, acknowledgement and response handling while consuming messages.
Logged when a service message is acknowledged by the consumer. (22409 - Information)
Logged when a subscription cancellation token is being cancelled (consumer shutting down or unsubscribing). (22220 - Debug)
Logged when a service message is being processed by a consumer. (22408 - Information)
Logged when processing a service message fails. (52410 - Error)
Logged when a previously waiting message is released from its wait (ready to be processed). (22412 - Information)
Logged when a consumed message results in returning an error response to the caller. (42413 - Warning)
Logged when a consumed message results in returning a valid response to the caller. (32414 - Information)
Logged when a message is queued / waiting to be processed. (22411 - Information)
MQContract
The primary class for producing an instance of either an IContractConnection or an IMultiServiceContractConnection
Instance(serviceConnection,defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper) method
This is the call used to create an instance of a Contract Connection which will return the Interface
An instance of IContractConnection
| Name | Type | Description |
|---|---|---|
| serviceConnection | MQContract.Interfaces.Service.IMessageServiceConnection | The service connection implementation to use for the underlying message requests. |
| defaultMessageEncoder | MQContract.Interfaces.Encoding.IMessageEncoder | A default message encoder implementation if desired. If there is no specific encoder for a given type, this encoder would be called. The built in default being used dotnet Json serializer. |
| defaultMessageEncryptor | MQContract.Interfaces.Encrypting.IMessageEncryptor | A default message encryptor implementation if desired. If there is no specific encryptor |
| serviceProvider | System.IServiceProvider | A service prodivder instance supplied in the case that dependency injection might be necessary |
| logger | Microsoft.Extensions.Logging.ILogger | An instance of a logger if logging is desired |
| channelMapper | MQContract.ChannelMapper | An instance of a ChannelMapper used to translate channels from one instance to another based on class channel attributes or supplied channels if necessary. |
| For example, it might be necessary for a Nats.IO instance when you are trying to read from a stored message stream that is comprised of another channel or set of channels |
using MQContract.InMemory;
var serviceConnection = new Connection();
var contractConnection = ContractConnection.Instance(serviceConnection);
MappedServiceInstance(defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper) method
This is the call used to create an instance of a Mapped Service Contract Connection which will return the Interface
An instance of IMultiServiceContractConnection
| Name | Type | Description |
|---|---|---|
| defaultMessageEncoder | MQContract.Interfaces.Encoding.IMessageEncoder | A default message encoder implementation if desired. If there is no specific encoder for a given type, this encoder would be called. The built in default being used dotnet Json serializer. |
| defaultMessageEncryptor | MQContract.Interfaces.Encrypting.IMessageEncryptor | A default message encryptor implementation if desired. If there is no specific encryptor |
| serviceProvider | System.IServiceProvider | A service prodivder instance supplied in the case that dependency injection might be necessary |
| logger | Microsoft.Extensions.Logging.ILogger | An instance of a logger if logging is desired |
| channelMapper | MQContract.ChannelMapper | An instance of a ChannelMapper used to translate channels from one instance to another based on class channel attributes or supplied channels if necessary. |
| For example, it might be necessary for a Nats.IO instance when you are trying to read from a stored message stream that is comprised of another channel or set of channels |
MultiServiceInstance(defaultMessageEncoder,defaultMessageEncryptor,serviceProvider,logger,channelMapper) method
This is the call used to create an instance of a Multi Service Contract Connection which will return the Interface
An instance of IMultiServiceContractConnection
| Name | Type | Description |
|---|---|---|
| defaultMessageEncoder | MQContract.Interfaces.Encoding.IMessageEncoder | A default message encoder implementation if desired. If there is no specific encoder for a given type, this encoder would be called. The built in default being used dotnet Json serializer. |
| defaultMessageEncryptor | MQContract.Interfaces.Encrypting.IMessageEncryptor | A default message encryptor implementation if desired. If there is no specific encryptor |
| serviceProvider | System.IServiceProvider | A service prodivder instance supplied in the case that dependency injection might be necessary |
| logger | Microsoft.Extensions.Logging.ILogger | An instance of a logger if logging is desired |
| channelMapper | MQContract.ChannelMapper | An instance of a ChannelMapper used to translate channels from one instance to another based on class channel attributes or supplied channels if necessary. |
| For example, it might be necessary for a Nats.IO instance when you are trying to read from a stored message stream that is comprised of another channel or set of channels |
MQContract
Thrown when dynamic code is not supported but a call that requires it is made
MQContract.Logging
Centralized well-known event id values used for structured logging across the MQContract library.
Event id bands:
- 1xxxx: Trace (hot-path diagnostic)
- 2xxxx: Debug (state transitions)
- 3xxxx: Information (lifecycle events)
- 4xxxx: Warning (recoverable issues)
- 5xxxx: Error
- 9xxxx: Critical (invariants broken, data-loss risk) Event id concern grouping:
- x1xxx: Lifetime (connection, subscription, middleware registration)
- x2xxx: Pipeline (middleware execution, message production/decoding, resilience)
- x3xxx: Publishing (publish operations, queries, bulk publish, transmission/timeout errors)
- x4xxx: Consuming (processing, acknowledgement, response handling)
- x5xxx: Transport (connection discovery, pinging, connector connection issues)
- x6xxx - x8xxx: (reserved for future concern groups) Event id area grouping:
- xx1xx: Connections (connection lifecycle, discovery, pinging)
- xx2xx: Subscriptions (subscription lifecycle, establishment, disposal)
- xx3xx: Middleware (registration, execution)
- xx4xx: Service Messages (production, decoding, filtering, processing attempts)
- xx5xx: Consumer Operations (acknowledgement, response handling)
- xx6xx: Resilience (retries, fallbacks)
- xx7xx: Contract Messages (Pubsub, queries, query responses) The nested classes group ids by concern (Lifetime, Pipeline, Publishing, Consuming, Transport).
MQContract
Thrown from a ContractConnection when an attempt to Register a given consumer through Type is not valid because the type does not implement the appropriate interface
MQContract
Thrown from a Contract Connection when an attempt is made to register a middleware that does not implement any middleware interfaces
MQContract
Thrown from a Resiliant Contract Connection when an attempt to create a policy is made but there is not any valid arguments
MQContract
Thrown when a query call message is received without proper data
MQContract
Thrown from a Resiliant Contract Connection when an attempt to create a policy is made but the retry count is higher than the circuit break count
MQContract.Logging.EventIds
Connection / lifetime related event id values. These ids cover creation, teardown and lifecycle operations for subscriptions, inboxes and middleware registration.
Logged when all inboxes are being closed (full shutdown of inbox resources). (31101 - Information)
Logged when an individual connection is being closed. (21100 - Debug)
Logged when a query-response subscription object is being constructed. (31210 - Information)
Logged when consumer registration fails. (51500 - Error)
Logged when a pub/sub subscription object is being created (start of creation). (21201 - Debug)
Logged when a query-response subscription is being created. (21209 - Debug)
Logged when a query-response subscription is being disposed. (31218 - Information)
Logged when metric middleware is explicitly enabled. (21301 - Debug)
Logged when a subscription is ending / being disposed. (31200 - Information)
Logged when an inbox subscription establishment starts. (21206 - Debug)
Logged when establishing a brand new inbox subscription. (21208 - Debug)
Logged when establishing a pub/sub service-side subscription begins (service-backed subscription). (21204 - Debug)
Logged when establishing a pub/sub service subscription completes successfully. (31205 - Information)
Logged when the process to establish a pub/sub subscription begins. (31202 - Information)
Logged when the query-response service subscription is being established. (31214 - Information)
Logged when the establishment of a query-response subscription starts. (21211 - Debug)
Logged when a query-response subscription's service-side subscription is being established. (31213 - Information)
Logged when establishing a query-response subscription that also uses a pub/sub service subscription. (31216 - Information)
Logged when establishing a pub/sub subscription fails. (51203 - Error)
Logged when a query-response subscription has been disposed. (31219 - Information)
Logged when establishing a query-response subscription fails. (51212 - Error)
Logged when a query-response subscription establishment fails with an error detail. (51217 - Error)
Logged when a query-response subscription establishment completes successfully. (31215 - Information)
Logged when middleware is being registered with the pipeline. (21300 - Debug)
Logged when inbox subscription setup is in progress. (31207 - Information)
MQContract
Thrown when a call is made but the system is unable to detect the channel
MQContract
Thrown when an incoming data message causes a null object return from a converter
MQContract
Thrown from the Mapped Connection when no connections match the search criteria making the requested action impossible to do
MQContract
Thrown from the ContractedConnection or the MappedConnection when there is no underlying service that supports the Ping call
MQContract.Logging.EventIds
Pipeline related event id values. These ids cover middleware execution, message production/decoding and resilience events on the message processing pipeline.
Logged when attempting to process an inbox message (begin processing attempt). (32405 - Information)
Logged when a service message is decoded into a domain/message object. (22402 - Information)
Logged when executing 'after decode' middleware. (22304 - Debug)
Logged when executing 'after encode' middleware. (22302 - Debug)
Logged when executing 'before decode' middleware. (22303 - Debug)
Logged when executing 'before encode' middleware in the pipeline. (22300 - Debug)
Logged when executing a specific 'after decode' middleware. (22305 - Debug)
Logged when executing a specific 'before encode' middleware (identifies a particular middleware). (22301 - Debug)
Logged when extracting a query response CLR type from a message or headers. (22700 - Debug)
Logged when a service message is filtered by the full message content (not only headers). (22403 - Information)
Logged when a service message is filtered based on header values. (22401 - Information)
Logged when processing a query response message in the pipeline. (22404 - Information)
Logged when processing a query response fails. (52406 - Error)
Logged when a service message is produced by the pipeline (a message sent internally or to a connector). (22400 - Information)
Logged when a query reply channel has been mapped (associating a response channel for a query). (22701 - Debug)
Logged when an invalid query response message is received (invalid format or unexpected payload). (42407 - Warning)
Logged when resilience fallback could not be performed after retries. (52601 - Error)
Logged when a resilience retry is triggered for an operation in the pipeline. (22600 - Debug)
MQContract.Logging.EventIds
Publishing related event id values. These ids cover publishing operations, queries, bulk publish and related transmission/timeout errors.
Logged when attempting a query response (publishing a response to a received query). (23710 - Information)
Logged when attempting a query response that will be performed via the pub/sub service. (33714 - Information)
Logged when multiple messages are being published in bulk. (23703 - Information)
Logged when executing the internal bulk publish routine. (23704 - Debug)
Logged when executing a query (publish+await response) from the publisher side. (23705 - Information)
Logged when executing a query response on the inbox service. (33712 - Information)
Logged when executing a query response on the pub/sub service. (33713 - Information)
Logged when executing a query response on the dedicated query-response service. (33711 - Information)
Logged when an inbox query has timed out waiting for a response. (23706 - Information)
Logged when a pub/sub query response is received. (23719 - Information)
Logged when a normal message publish operation is performed. (23702 - Information)
Logged when a query operation throws an exception. (53709 - Error)
Logged when starting a pub/sub listener that receives query responses. (23715 - Information)
Logged when an inbox query is being transmitted to a remote service/connector. (33707 - Information)
Logged when transmitting an inbox query failed. (53708 - Error)
Logged when a pub/sub query is being transmitted. (23716 - Information)
Logged when a pub/sub query transmission fails. (53717 - Error)
Logged when awaiting a response for a pub/sub query. (23718 - Information)
MQContract
Thrown when a query call is being made to a service that does not support query response and the listener cannot be created
MQContract
Thrown when a Query call is made and there is an error in the response
MQContract
Thrown when a query call times out waiting for the response
MQContract
Thrown when a Subscription has failed to be established/created
MQContract
Thrown from the Mapped Connection when more than 1 connection matches the search criteria making the requested action impossible to do
MQContract.Logging.EventIds
Transport related event id values. These ids cover connection discovery, pinging and issues locating connector connections.
Logged when too many connections are located (unexpected multiplicity). (55106 - Error)
Logged when too many connections are located for a specific map type (unexpected multiplicity for typed lookup). (55107 - Error)
Logged when attempting to locate connections (discovery/lookup). (25103 - Debug)
Logged when locating connections for a specific map type (lookup for a typed mapping). (25104 - Debug)
Logged when a ping to a service connection is performed. (25102 - Debug)
Logged when unable to find any matching connections for a lookup. (55105 - Error)
MQContract
Thrown when a QueryResponse type message is attempted without specifying the response type and there is no Response Type attribute for the query class.