Ejemplo n.º 1
0
        public async Task Send <T>(T command, string queueName = "") where T : class
        {
            BusControl = BusControl ?? BuildBus();
            if (queueName == string.Empty)
            {
                queueName = command.GetType().Assembly.GetName().Name + "_CoolBus";
            }

            var sendToUri = new Uri($"rabbitmq://{RabbitConfig.HostName}:{RabbitConfig.Port}/{queueName}");
            var endPoint  = await BusControl.GetSendEndpoint(sendToUri);

            await endPoint.Send(command);
        }
Ejemplo n.º 2
0
 public async Task <ISendEndpoint> GetSendEndpoint(Uri address)
 {
     return(await BusControl.GetSendEndpoint(address).ConfigureAwait(false));
 }