public static SubscriptionBuilder AddDefaultSubscription <TEvent>( this SubscriptionBuilder subscriptionBuilder, Func <IntegrationEvent <TEvent>, Task> consumer, Func <IntegrationEvent <TEvent>, Exception, Task> deadLetterCallback = null) where TEvent : class { var lambdaConsumer = new LambdaConsumer <TEvent>(consumer); subscriptionBuilder.AddDefaultSubscription(() => lambdaConsumer, deadLetterCallback); return(subscriptionBuilder); }