public RPCClient(int millisecondsTimeout) { _busItem = RabbitBus.Borrow(RPC.Policy); InitConsumer(); _signal = new AutoResetEvent(false); _millisecondsTimeout = millisecondsTimeout; }
public EventSubscriber(string eventName, string group) { _eventName = eventName; _queue = string.Format("{0}-{1}", eventName, group); _isWorking = false; _busItem = RabbitBus.Borrow(Event.Policy); }
public void Publish(string eventName, DTObject arg) { using (var temp = RabbitBus.Borrow(Event.Policy)) { var bus = temp.Item; bus.ExchangeDeclare(Event.Exchange, ExchangeType.Topic); var routingKey = eventName; bus.Publish(Event.Exchange, routingKey, arg); } }
public RPCServer(string method) { _busItem = RabbitBus.Borrow(RPC.Policy); _queue = RPC.GetServerQueue(method); }