Sending XML result set to MSMQ queue

  • Hi all,

    I need to send an XML-file to a remote private MSMQ queue using SSIS.

    The MSMQ-task doesn't send to remote private queues. Has anyone any idea how to do this?

  • Sorry for the late response, hope I am not too late to help,

    If you read your XML file into a string variable called MessageQXML then run this as a script task you should be just about there.

    Replace "Message Queue Connection Manager" with the name of the connection manager to the remote private q that exists in your SSIS Package.

    The connection should look like FORMATNAME:DIRECT=OS:

    There are also some instance wheer "FORMATNAME" does not seem tot work and "FormatName" does

    Imports System

    Imports Microsoft.SqlServer.Dts.Runtime

    Imports System.Messaging

    Public Class ScriptMain

    Public Sub Main()

    Dim RemoteServersPrivateQueue As MessageQueue

    Dim str_messageText As String

    RemoteServersPrivateQueue = _

    DirectCast(Dts.Connections("Message Queue Connection Manager").AcquireConnection(Dts.Transaction), MessageQueue)

    str)messageText = DirectCast(Dts.Variables("MessageQXML").Value, String)

    RemoteServersPrivateQueue.Send(str_messageText)

    Dts.TaskResult = Dts.Results.Success

    End Sub

    End Class

    Hope this Helps, although I think I am just going to use BizTalk instead

    Garry

    PS You may need to add a reference to System.Messaging in your project

  • Hello all,

    Did you manage to get the SSIS to work? I'm trying to implementing one SSIS with MessageQueueTask in order to send some XML messages to a remote private queue, but i cannot even get the connection to work...

    As i said i'm trying to connect to a remote private queue and always getting the same error: "Cannot determine whether a queue with the specified format name exists." I've already searched and tryed some suggested solutions, but nothing works.

    Below are the connection strings i've already tryed with no success:

    (Lets say, the remote machine is sdvt35, it's ip address is 10.11.9.115, and remote private queue is plada)

    1. "FormatName:DIRECT=TCP:10.11.9.115\private$\plada"

    2. "FORMATNAME:DIRECT=TCP:10.11.9.115\private$\plada"

    3. "FormatName:DIRECT=OS:sdvt35\private$\plada"

    4. "FORMATNAME:DIRECT=OS:sdvt35\private$\plada"

    All of these failed...

    I'm implementing this SSIS on a Dev Server (w2k8 Enterprise with integration services) and the machine that has the private queue is Vista Enterprise. Both Server and client machine have msmq installed... I'm using windows login credentials and i'm pretty sure i can reach remote queue with my login credentials.

    If i create a private queue on the server side, i can easily connect to it, so why does not work with a remote private queue?

    Please advise and thanks in advance!

    PM

  • Hi there,

    I am also facing the same problem ....so can anybody help us to sort this issue....

    The Connection Manager that mentioned here is created dynamically or should I create it by using Add New Connection Manager wizard..

    Ankush

  • The connection manager in this example is created manually using the wizard. It is only referenced in the code not created.

  • does it help if you supply a port number (1414 or something) ?

  • http://technet.microsoft.com/en-us/library/ms403349.aspx

    In Integration Services, the MSMQ connection manager and Message Queue task do not support sending to a private queue on a remote computer.

    I'm struggling through the same issue myself.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply