public async Task <bool> EnqueueShiftNotification(ShiftQueueItem shiftQueueItem) { if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) { return(_rabbitOutboundQueueProvider.EnqueueShiftNotification(shiftQueueItem)); } VerifyAndCreateClients(); Message message = new Message(Encoding.UTF8.GetBytes(ObjectSerialization.Serialize(shiftQueueItem))); message.MessageId = Guid.NewGuid().ToString(); return(await SendMessage(_shiftsClient, message)); }
public void EnqueueShiftNotification(ShiftQueueItem shiftQueueItem) { if (SystemBehaviorConfig.ServiceBusType == ServiceBusTypes.Rabbit) { _rabbitOutboundQueueProvider.EnqueueShiftNotification(shiftQueueItem); return; } VerifyAndCreateClients(); BrokeredMessage message = new BrokeredMessage(ObjectSerialization.Serialize(shiftQueueItem)); message.MessageId = Guid.NewGuid().ToString(); SendMessage(_shiftsClient, message); }