/// <summary> /// <para> /// Adds the necessary services to enable the <see cref="LogExactlyOnceStrategy" /> using a /// database table as store. /// </para> /// <para> /// The <see cref="LogExactlyOnceStrategy" /> stores uses an <see cref="IInboundLog" /> to /// keep track of to keep track of each processed message and guarantee that each one is processed /// only once. /// </para> /// </summary> /// <param name="brokerOptionsBuilder"> /// The <see cref="IBrokerOptionsBuilder" /> that references the <see cref="IServiceCollection" /> to /// add the services to. /// </param> /// <returns> /// The <see cref="IBrokerOptionsBuilder" /> so that additional calls can be chained. /// </returns> public static IBrokerOptionsBuilder AddInboundLogDatabaseTable(this IBrokerOptionsBuilder brokerOptionsBuilder) { Check.NotNull(brokerOptionsBuilder, nameof(brokerOptionsBuilder)); return(brokerOptionsBuilder.AddInboundLog <DbInboundLog>()); }
/// <summary> /// <para> /// Adds the necessary services to enable the <see cref="LogExactlyOnceStrategy" /> storing the /// offsets in memory. /// </para> /// <para> /// The <see cref="LogExactlyOnceStrategy" /> stores uses an <see cref="IInboundLog" /> to /// keep track of to keep track of each processed message and guarantee that each one is processed /// only once. /// </para> /// </summary> /// <param name="brokerOptionsBuilder"> /// The <see cref="IBrokerOptionsBuilder" /> that references the <see cref="IServiceCollection" /> to /// add the services to. /// </param> /// <returns> /// The <see cref="IBrokerOptionsBuilder" /> so that additional calls can be chained. /// </returns> public static IBrokerOptionsBuilder AddInMemoryInboundLog(this IBrokerOptionsBuilder brokerOptionsBuilder) { Check.NotNull(brokerOptionsBuilder, nameof(brokerOptionsBuilder)); return(brokerOptionsBuilder.AddInboundLog <InMemoryInboundLog>()); }