protectzuloo.blogg.se

Masstransit multibus
Masstransit multibus





masstransit multibus

t.RequestTimeout = TimeSpan.FromSeconds(5) Į.AutoOffsetReset = AutoOffsetReset.Earliest T.ReplicationFactor = 1 //number of replicas T.NumPartitions = 3 //number of partitions Ssal.Mechanism = SaslMechanism.ScramSha512 Ĭonfig.SecurityProtocol = SecurityProtocol.SaslSsl Ĭonfig.Debug = "broker,topic,msg,consumer,cgrp" Ĭonfig.TopicEndpoint(TopicName, "group12345", e => Ssal.Password = asyncApiServiceBusKafkaOptions.Password Ssal.Username = asyncApiServiceBusKafkaOptions.Username Path + asyncApiServiceBusKafkaOptions.SslCertificateLocation Ssl.KeyLocation = path + asyncApiServiceBusKafkaOptions.SslKeyLocation Ssl.CaLocation = path + asyncApiServiceBusKafkaOptions.SslCaLocation X.UsingInMemory((context, config) => config.ConfigureEndpoints(context)) Ĭonfig.Host(asyncApiServiceBusKafkaOptions.Host, kafkaHostConfigurator =>

#Masstransit multibus registration#

To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. The requested service '' has not been registered. _lifetimeScope.TryResolve(out ITopicProducer topicProducer)

masstransit multibus

Var s = _serviceProvider.GetRequiredService>() In general i'm not sure how in a MultiBus scenario you can resolve the right rider from Autofac container (ILifetimeScope), any suggestion? I have a backend service that should publish message to Kafka, the bus is started and running, however when the service try to resolve ITopicProducer I'm getting DependencyResolutionException about the IKafkaRider. (not relevant but for general information I'm going to have 2 bus with RabbitMQ transportation, and 2 bus with memory transportation and Kafka rider, but let's start with launching one working bus with kafka) I'm trying to use MultiBus setup with Autofac and produce a message to Kafka from a hosted service.







Masstransit multibus