public async Task Publish(IEnumerable <ProductDto> products)
        {
            var topicClient = _serviceBusFactory.CreateTopicClient();

            var message = _serviceBusFactory.CreateMessage(JsonConvert.SerializeObject(products));

            await topicClient.SendAsync(message);
        }
Beispiel #2
0
        public async Task Publish(JobDto job)
        {
            var client = _serviceBusFactory.CreateQueueClient();

            var message = _serviceBusFactory.CreateMessage(JsonConvert.SerializeObject(job));

            await client.SendAsync(message);
        }