Table of Contents

SubscribeAsync Method

Definition

Namespace
Savvyio.EventDriven.Messaging
Assemblies
Savvyio.EventDriven.Messaging.dll
Source
src/Savvyio.EventDriven.Messaging/InMemoryEventBus.cs

SubscribeAsync(Func<IMessage<IIntegrationEvent>, CancellationToken, Task>, Action<SubscribeAsyncOptions>)

Subscribe to one or more event(s) asynchronous using Publish-Subscribe Channel/Pub-Sub MEP.

public Task SubscribeAsync(Func<IMessage<IIntegrationEvent>, CancellationToken, Task> asyncHandler, Action<SubscribeAsyncOptions> setup = null)

Parameters

asyncHandler Func<IMessage<IIntegrationEvent>, CancellationToken, Task>

The delegate that will handle the event.

setup Action<SubscribeAsyncOptions>

The SubscribeAsyncOptions which may be configured.

Returns

Task

A Task that represents the asynchronous operation.