IReceivePipe IReceivePipeConfiguration.CreatePipe(IConsumePipe consumePipe, IMessageDeserializer messageDeserializer, Action <IPipeConfigurator <ReceiveContext> > configure) { if (_created) { throw new ConfigurationException("The ReceivePipeConfiguration can only be used once."); } if (configure == null) { DeadLetterConfigurator.UseFilter(new DeadLetterTransportFilter()); _configurator.UseDeadLetter(DeadLetterConfigurator.Build()); ErrorConfigurator.UseFilter(new GenerateFaultFilter()); ErrorConfigurator.UseFilter(new ErrorTransportFilter()); _configurator.UseRescue(ErrorConfigurator.Build(), x => { x.Ignore <OperationCanceledException>(); }); } else { configure(_configurator); } _configurator.UseFilter(new DeserializeFilter(messageDeserializer, consumePipe)); _created = true; return(new ReceivePipe(_configurator.Build(), consumePipe)); }
public IReceivePipe CreatePipe(IConsumePipe consumePipe, IMessageDeserializer messageDeserializer) { if (_created) { throw new ConfigurationException("The ReceivePipeConfiguration can only be used once."); } _configurator.UseDeadLetter(CreateDeadLetterPipe()); _configurator.UseRescue(CreateErrorPipe(), x => { x.Ignore <OperationCanceledException>(); }); _configurator.UseFilter(new DeserializeFilter(messageDeserializer, consumePipe)); _created = true; return(new ReceivePipe(_configurator.Build(), consumePipe)); }
public IReceivePipe CreatePipe(IConsumePipe consumePipe, IMessageDeserializer messageDeserializer) { if (_created) { throw new ConfigurationException("The ReceivePipeConfiguration can only be used once."); } _deadLetterPipeConfigurator.UseFilter(new DeadLetterTransportFilter()); _configurator.UseDeadLetter(_deadLetterPipeConfigurator.Build()); _errorPipeConfigurator.UseFilter(new GenerateFaultFilter()); _errorPipeConfigurator.UseFilter(new ErrorTransportFilter()); _configurator.UseRescue(_errorPipeConfigurator.Build()); _configurator.UseFilter(new DeserializeFilter(messageDeserializer, consumePipe)); _created = true; return(new ReceivePipe(_configurator.Build(), consumePipe)); }