protected override void RegisterCallbackListener(string queueName, EventReceivedCallback callback) { _busProvider.BasicConsume( queueName: queueName, callback: callback, autoAcknowledge: false); _busProvider.BasicQos(0, 1); }
public CommandPublisher(IBusProvider busProvider) { EnsureArg.IsNotNull(busProvider, nameof(busProvider)); _busProvider = busProvider; _commandCallbacks = new ConcurrentDictionary <Guid, Action <string, bool> >(); _busProvider.EnsureConnection(); _callbackQueue = $"CommandQueue-{Guid.NewGuid().ToString()}"; _busProvider.BasicConsume(_callbackQueue, HandleCommandCallback); }
protected override void RegisterCallbackListener(string queueName, EventReceivedCallback callback) { _busProvider.BasicConsume(queueName, callback); }