public ReplyDelivery(string exchange, RogerEndpoint recipient, byte[] body, Action<BasicReturn> basicReturnCallback, Func<RogerEndpoint, IBasicProperties> createProperties) : base(createProperties, basicReturnCallback, exchange, recipient, body) { }
public SendFactory(Type messageType, string exchange, RogerEndpoint recipient, byte[] body, Action<BasicReturn> basicReturnCallback, bool persistent) : base(messageType, persistent) { this.exchange = exchange; this.recipient = recipient; this.body = body; this.basicReturnCallback = basicReturnCallback; }
public ReplyDelivery(string exchange, RogerEndpoint recipient, byte[] body, Action <BasicReturn> basicReturnCallback, Func <RogerEndpoint, IBasicProperties> createProperties) : base(createProperties, basicReturnCallback, exchange, recipient, body) { }
public void Execute(IModel model, RogerEndpoint endpoint, IPublishModule module) { var properties = createProperties(endpoint); module.BeforePublish(this, model, properties, basicReturnCallback); ExecuteCore(model, properties); }
void IReceive <ConsumingEnabled> .Receive(ConsumingEnabled message) { endpoint = message.Endpoint; model = message.Connection.CreateModel(); modules.BeforePublishEnabled(model); EnablePublishing(); }
public void Send(RogerEndpoint recipient, object message, Action <BasicReturn> basicReturnCallback, bool persistent, bool sequence) { var messageType = message.GetType(); Enqueue(new SendFactory(messageType, Exchange(messageType), recipient, Serialize(message), basicReturnCallback, persistent, sequence)); }
public SendFactory(Type messageType, string exchange, RogerEndpoint recipient, byte[] body, Action <BasicReturn> basicReturnCallback, bool persistent, bool sequence) : base(messageType, persistent, sequence) { this.exchange = exchange; this.recipient = recipient; this.body = body; this.basicReturnCallback = basicReturnCallback; }
private void StartConsuming(IReliableConnection connection) { Model = connection.CreateModel(); Model.ModelShutdown += ModelOnModelShutdown; if (options.PrefetchCount.HasValue) { log.InfoFormat("Setting QoS with prefetch count {0} on consuming channel", options.PrefetchCount); Model.BasicQos(0, options.PrefetchCount.Value, false); } Endpoint = new RogerEndpoint(Endpoint.IsEmpty ? queueFactory.Create(Model) : queueFactory.Create(Endpoint.Queue, Model)); CreateBindings(new HashSet <Type>(consumerContainer.GetAllConsumerTypes().SelectMany(supportedMessageTypesResolver.Resolve))); log.DebugFormat("Declared and eventually bound endpoint {0}", Endpoint); aggregator.Notify(new ConsumingEnabled(Endpoint, connection)); CreateConsumer(); consumingTask = Task.Factory.StartNew(ConsumeSynchronously, TaskCreationOptions.LongRunning); }
public SequenceKey(RogerEndpoint endpoint, Type messageType) { Endpoint = endpoint; MessageType = messageType.HierarchyRoot(); }
public ConsumingEnabled(RogerEndpoint endpoint, IReliableConnection connection) { Endpoint = endpoint; Connection = connection; }