AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.09.2018, 15:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsnavax: Send to Azure Service Bus in #MSDyn365FO
Источник: http://dynamicsnavax.blogspot.com/20...sdyn365fo.html
==============

Sending a message to Azure Service Bus is really simple in FinOps.

Below is the job I wrote to send a message to the service bus. It takes a connection string and a queue name for connecting. The message string and key value pair list can be supplied to the properties.



static str connectionString = 'Endpoint=sb://navaxservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=h5KwXSEFIHxxxxxxxxxxxxxxxxxx';
static str queueName = 'navaxqueue';

///
/// Runs the class with the specified arguments.
///
/// The specified arguments.
public static void main(Args _args)
{
if (connectionString && queueName)
{
Microsoft.ServiceBus.Messaging.QueueClient queueClient = Microsoft.ServiceBus.Messaging.QueueClient::CreateFromConnectionString(connectionString, queueName);
Microsoft.ServiceBus.Messaging.BrokeredMessage brokeredMessage = new Microsoft.ServiceBus.Messaging.BrokeredMessage("My Message");

var properties = brokeredMessage.Properties;

properties.Add("MyKey1", "MyValue1");
properties.Add("MyKey2", "MyValue2");

queueClient.Send(brokeredMessage);
}
}
Using Service Bus Explorer you can see the result.



At the moment Microsoft is working on event based triggers. One of the possible solutions they presented was writing to the service bus. Looking forward to it.

I took inspiration from one of the standard classes I noticed in in 8PU15. It subscribes to the insert/delete of a user record to send the user detail to a service bus. The big bonus is that service bus assembles are included on the machine. I won’t dive any deeper into this class in this blog post.





Источник: http://dynamicsnavax.blogspot.com/20...sdyn365fo.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Using Service Management to Track Service Orders Blog bot DAX Blogs 1 25.08.2013 19:16
AIF: Microsoft Dynamics AX Services and Windows Azure Service Bus Blog bot DAX Blogs 0 24.07.2013 03:13
dynamics-coe: Simple “Publish-Subscribe” integration with Dynamics CRM using Azure Service Bus Topics/Subscriptions Blog bot Dynamics CRM: Blogs 0 07.03.2013 12:11
Freddys: Multiple Service Tiers Blog bot Dynamics CRM: Blogs 0 30.10.2008 01:59
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:18.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.