public void Configuring_an_endpoint_serializer() { _endpointCache = EndpointCacheFactory.New(x => { x.AddTransportFactory <LoopbackTransportFactory>(); x.ConfigureEndpoint("loopback://localhost/mt_client", y => { y.UseSerializer <VersionOneXmlMessageSerializer>() .DiscardFaultingMessages(); }); x.ConfigureEndpoint("loopback://localhost/mt_other", y => { y.SetErrorAddress("loopback://localhost/mt_error"); }); }); }
public void Configuring_an_endpoint_serializer() { _endpointCache = EndpointCacheFactory.New(x => { x.SetDefaultRetryLimit(5); x.SetDefaultInboundMessageTrackerFactory(retryLimit => new InMemoryInboundMessageTracker(retryLimit)); x.AddTransportFactory <LoopbackTransportFactory>(); x.ConfigureEndpoint("loopback://localhost/mt_client", y => { y.UseSerializer <JsonMessageSerializer>() .DiscardFaultingMessages(); }); x.ConfigureEndpoint("loopback://localhost/mt_other", y => { y.SetErrorAddress("loopback://localhost/mt_error"); }); }); }
public EdiDocsInRegistry() { var config = new AFPSTConfiguration(); For <INotificationSender>().Use <NotificationSender>() .Ctor <Queue>("notificationEndpoint").Is(config.GetQueue("EmailServiceHost", "EmailServiceEndpoint")) .Ctor <IEndpointCache>().Is(EndpointCacheFactory.New(ecf => ecf.AddTransportFactory <MsmqTransportFactory>())); For <IGenericDocumentParser>().Use <GenericDocParser <OrderRequestReceivedMessage> >(); For <IInitech850LineParser>().Use <Initech850LineParser>(); For <ICreateEdiContentFrom <OrderRequestReceivedMessage> >().Use <Initech855Creator>(); For <ISegmentFactory>().Use <SegmentFactory>().Named("segFactory"); For <IControlNumberRepository>().Use <ControlNumberRepository>().Named("controlNumRepo"); For <IAssignDocumentsToPartners>().Use <DocumentPartnerAssigner>(); For <IBusinessPartnerSpecificServiceResolver>().Use <BusinessPartnerSpecificServiceResolver>(); For <IFileParser>().Use <InitechFileParser>(); For <IDocumentParser>().Use <Initech850Parser>(); For <IDocumentParser>().Use <Initech997Parser>(); For <IEdiMessagePublisher>().Use <CreateOrderMessagePublisher>(); For <IEdiMessagePublisher>().Use <ChangeOrderMessagePublisher>(); For <IEdiMessagePublisher>().Use <ShippedOrderMessagePublisher>(); }
public StructureMapRegistry() { var config = new AFPSTConfiguration(); // _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderHasBeenShippedMessage>>()); // _unsubscribeActions.Add(_bus.Subscribe<FaultSubscriber<OrderHasBeenShippedMessage>>()); // _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderIsBackorderedMessage>>()); // _unsubscribeActions.Add(_bus.Subscribe<Subscriber<OrderRequestReceivedMessage>>()); // _unsubscribeActions.Add(_bus.Subscribe<Subscriber<InvoicedOrderMessage>>()); // _unsubscribeActions.Add(_bus.Subscribe<FaultSubscriber<InvoicedOrderMessage>>()); // // Adding Ignore Subscriber to remove unwanted messages from queue // _bus.Subscribe<IgnoreSubscriber<OrderHasBeenShippedMessage>>(); // _bus.Subscribe<IgnoreSubscriber<OrderRequestReceivedMessage>>(); // if(runOnce) Stop(); For <INotificationSender>().Use <NotificationSender>() .Ctor <Queue>("notificationEndpoint").Is(config.GetQueue("EmailServiceHost", "EmailServiceEndpoint")) .Ctor <IEndpointCache>().Is(EndpointCacheFactory.New(ecf => ecf.AddTransportFactory <MsmqTransportFactory>())); For <IConsumer>().Use <WWTSubscriber <OrderRequestReceivedMessage> >(); For <IConsumer>().Use <WWTSubscriber <OrderHasBeenShippedMessage> >(); For <IConsumer>().Use <WWTSubscriber <InvoicedOrderMessage> >(); For <IConsumer>().Use <Subscriber <OrderRequestReceivedMessage> >(); For <IConsumer>().Use <Subscriber <OrderHasBeenShippedMessage> >(); For <IConsumer>().Use <Subscriber <OrderChangeRequestReceivedMessage> >(); For <IConsumer>().Use <Subscriber <OrderIsBackorderedMessage> >(); For <IConsumer>().Use <Subscriber <InvoicedOrderMessage> >(); For <IConsumer>().Use <FaultSubscriber <InvoicedOrderMessage> >(); For <IConsumer>().Use <FaultSubscriber <OrderHasBeenShippedMessage> >(); //For<IMessageSender<LabelPrintRequestMessage>>().Use<MessageSender<LabelPrintRequestMessage>>() // .Ctor<Queue>("queue").Is(config.GetQueue("reissueLabelQueueHost", "reissueLabelQueue")); }
public void SetUp() { IEndpointCache endpointCache = EndpointCacheFactory.New(x => x.AddTransportFactory <TTransportFactory>()); _endpoint = endpointCache.GetEndpoint(Address); }
public void Should_throw_an_endpoint_exception_from_the_endpoint_factory() { IEndpointCache endpointCache = EndpointCacheFactory.New(x => { x.AddTransportFactory <MsmqTransportFactory>(); }); endpointCache.GetEndpoint(_uri); }
public void SetUp() { _endpointCache = EndpointCacheFactory.New(c => { c.AddTransportFactory <TTransportFactory>(); }); _endpoint = _endpointCache.GetEndpoint(Address); }
public void SetUp() { MassTransitEdiDocsOutBootstrapper.Execute(); StructureMapBootstrapper.Execute(); _endpointResolver = EndpointCacheFactory.New(ecf => ecf.AddTransportFactory <MsmqTransportFactory>()); }