Class NatsEventBus<TMarker>
- Namespace
- Savvyio.Extensions.DependencyInjection.NATS.EventDriven
- Assembly
- Savvyio.Extensions.DependencyInjection.NATS.dll
Provides a default implementation of the NatsMessage class for messages holding an IIntegrationEvent implementation.
public class NatsEventBus<TMarker> : NatsEventBus, IDisposable, IAsyncDisposable, IHealthCheckProvider<INatsConnection>, IPublishSubscribeChannel<IIntegrationEvent, TMarker>, IPublishSubscribeChannel<IIntegrationEvent>, IPublisher<IIntegrationEvent, TMarker>, IPublisher<IIntegrationEvent>, ISubscriber<IIntegrationEvent, TMarker>, ISubscriber<IIntegrationEvent>, IDependencyInjectionMarker<TMarker>
Type Parameters
TMarker
- Inheritance
-
NatsEventBus<TMarker>
- Implements
-
IHealthCheckProvider<INatsConnection>IPublishSubscribeChannel<IIntegrationEvent, TMarker>IPublisher<IIntegrationEvent, TMarker>ISubscriber<IIntegrationEvent, TMarker>IDependencyInjectionMarker<TMarker>
- Inherited Members
Constructors
NatsEventBus(IMarshaller, NatsEventBusOptions<TMarker>)
Initializes a new instance of the NatsEventBus class.
public NatsEventBus(IMarshaller marshaller, NatsEventBusOptions<TMarker> options)
Parameters
marshallerIMarshallerThe marshaller used for serializing and deserializing messages.
optionsNatsEventBusOptions<TMarker>The options used to configure the NATS event bus.
Exceptions
- ArgumentNullException
marshallercannot be null -or-optionscannot be null.- ArgumentException
optionsare not in a valid state.
See Also
IPublishSubscribeChannel<TRequest, TMarker>