Hi,
I'm new to masstransit and I'm trying to injrct dependencies in my message consumer.
I'm not sure how to register my consumer using autofac.
Any help would be highly appreciated :-)
Thanks,
Alex
public class InstrumentCommandConsumer : IConsumer<TakeMeasure>
{
private IUnitOfWorkAsync _uow;
private IInstrumentOutputDomainService _instrumentOutputDomainService;
public InstrumentCommandHandler(IUnitOfWorkAsync uow,
IInstrumentOutputDomainService instrumentOutputDomainService)
{
_uow = uow;
_instrumentOutputDomainService = instrumentOutputDomainService;
}
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a688cf83-8549-424c-b32a-a8bd1e2e526f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Chris,
As you said the doc for autofac is well documented, but I just don't understand how to register my consumer. It says that it needs a parameterless constructor to be registered.
I must have missed smth...
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/-L0QIsJXfq4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYdD25oYKH4DRTWxynwcAtiDsLmynj7FKbCQiXV3vkQj7A%40mail.gmail.com.
Hi Chris,
As you said the doc for autofac is well documented, but I just don't understand how to register my consumer. It says that it needs a parameterless constructor to be registered.
I must have missed smth...
On Sat, Oct 3, 2015, 11:04 AM Chris Patterson <ch...@phatboyg.com> wrote:
Usage of Autofac (and several other containers) is well documented in the documentation.On Sat, Oct 3, 2015 at 9:42 AM, alexandre joyeux <alexan...@gmail.com> wrote:Hi,
I'm new to masstransit and I'm trying to injrct dependencies in my message consumer.
I'm not sure how to register my consumer using autofac.
Any help would be highly appreciated :-)
Thanks,
Alex
public class InstrumentCommandConsumer : IConsumer<TakeMeasure>
{
private IUnitOfWorkAsync _uow;
private IInstrumentOutputDomainService _instrumentOutputDomainService;
public InstrumentCommandHandler(IUnitOfWorkAsync uow,
IInstrumentOutputDomainService instrumentOutputDomainService)
{
_uow = uow;
_instrumentOutputDomainService = instrumentOutputDomainService;
}
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
--
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a688cf83-8549-424c-b32a-a8bd1e2e526f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/-L0QIsJXfq4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/6fb465ee-ccd5-4b33-ba37-876671b1d758%40googlegroups.com.
Hi Chris,
As you said the doc for autofac is well documented, but I just don't understand how to register my consumer. It says that it needs a parameterless constructor to be registered.
I must have missed smth...
On Sat, Oct 3, 2015, 11:04 AM Chris Patterson <ch...@phatboyg.com> wrote:
Usage of Autofac (and several other containers) is well documented in the documentation.On Sat, Oct 3, 2015 at 9:42 AM, alexandre joyeux <alexan...@gmail.com> wrote:Hi,
I'm new to masstransit and I'm trying to injrct dependencies in my message consumer.
I'm not sure how to register my consumer using autofac.
Any help would be highly appreciated :-)
Thanks,
Alex
public class InstrumentCommandConsumer : IConsumer<TakeMeasure>
{
private IUnitOfWorkAsync _uow;
private IInstrumentOutputDomainService _instrumentOutputDomainService;
public InstrumentCommandHandler(IUnitOfWorkAsync uow,
IInstrumentOutputDomainService instrumentOutputDomainService)
{
_uow = uow;
_instrumentOutputDomainService = instrumentOutputDomainService;
}
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
--
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a688cf83-8549-424c-b32a-a8bd1e2e526f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/-L0QIsJXfq4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-discuss+unsub...@googlegroups.com.
private static IBusControl InitialiseBus(MessagingConfiguration messagingConfiguration, IUnityContainer container) { IBusControl busControl = Bus.Factory.CreateUsingRabbitMq(busFactoryConfigurator => { var host = busFactoryConfigurator.Host(new Uri(messagingConfiguration.MqServerUri), rabbitMqHostConfigurator => { rabbitMqHostConfigurator.Username(messagingConfiguration.Username); rabbitMqHostConfigurator.Password(messagingConfiguration.Password); }); busFactoryConfigurator.ReceiveEndpoint(host, messagingConfiguration.ReceiveQueue, receiveEndpointConfigurator => { // Uncomment When you have a ISaga // receiveEndpointConfigurator.LoadFrom(UnityBootstrapper.Container); receiveEndpointConfigurator.Consumer<PaymentRequestConsumer>(container); }); }); return busControl; }