从ssis连接到azure服务总线队列
我有一个需要将票证从SSIS包放入天蓝色队列的要求.
I have a requirement where I need to put a ticket into an azure queue from a SSIS package.
我以前已经使用消息队列任务"设置了控制流,以便在MSMQ中添加票证,但是不知道是否有办法将票证触发到azure服务总线队列中.
I have previously set up control flows using "Message Queue Tasks" for add a ticket in MSMQ but did not know if there was way to trigger tickets into an azure service bus queue.
我尝试过的事情:
作为一种替代解决方案,我以中间人身份使用REST Web服务进行访问.我使用"Web服务任务"触发了Web服务,然后将票证放入了天蓝色队列中.
As a alternative solution, I am accessing use a REST web service as a middle man. I trigger the webservice using "Web Service Task" which then puts a ticket in the azure queue.
一般有两种解决问题的方法
There are two approaches of solving the problem in general
从技术上讲,您可以在SSIS程序包和azure服务总线队列之间使用单独的基础结构片段,后者可以使用nuget引用Azure SDK并为您放置票证,然后您的SSIS程序包将调用此REST Web api来放置票证内.
you could technically have a separate infrastructure piece between your SSIS package and the azure service bus queue which could reference the Azure SDK using nuget and put tickets for you, your SSIS package would then be calling this REST web api to put the ticket in.
您可以在SSIS包的脚本任务中引用Microsoft.ServiceBus.dll,该脚本任务将构造BrokeredMessage并将其放入队列中.
You could reference the Microsoft.ServiceBus.dll inside a script task in the SSIS package which will construct a BrokeredMessage and put it in the queue.
需要使用gacutil.exe将dll添加到GAC中,脚本任务才能在运行时工作.
The dll needs to be added to the GAC using gacutil.exe for the script task to work at runtime.
您可以创建一个脚本任务,该脚本任务使用azure服务总线REST API调用和放置消息.这里有一个教程: https://msdn.microsoft.com/zh-cn/library/azure/hh416754.aspx ,但是我从来没有碰到过发送实际数据的问题.
You could create a script task which calls and puts message using azure service bus REST API. There is a tutorial available here : https://msdn.microsoft.com/en-us/library/azure/hh416754.aspx but I never happened get beyond the point of sending actual data.