MSMQ for 3.7b

HushdontspammeHushdontspamme Member Posts: 56
Hi

I am very new to MSMQ. I have configured some private queues and also the new MSMQ 3.0 via HTTP to send to another subnet.

My question is, what is the simplest method with using NAS to send a MSMQ message from Navision to a MSMQ Q.

Regards

James

Comments

  • andreofandreof Member Posts: 133
    I've done something like that about 2 years ago and i remember that i used standard navision codeunits to listen to the queue and work with the XML content in each message. So you need to configure NAS to use the queues you create (out and in) and then you should look at CodeUnits 6217,6221,6224,6225,6226. Sorry not to be more especific.
    Andre Fidalgo
    My world: Dynamics NAV,SQL and .NET

    CEO at Solving Dynamics
    http://www.solvingdynamics.com
  • DduranDduran Member Posts: 22
    HI james,

    in the cd of your standard version there is a help file with some examples. Start the Cd, choose the menu tools and then, select the file communication component/bus adapter option.

    i hope it can help you.
  • HushdontspammeHushdontspamme Member Posts: 56
    Hi

    I have got 3.7B to send messages out no problem: using


    MQBus.OpenWriteQueue('computername\fromNavision',0,0);
    OutMsg := CC2.CreateoutMessage('Message [url=queue://computername]queue://computername[/url]\fromNavision');
    OutS := OutMsg.GetStream();

    //fill the message and send it
    OutS.WRITE(XMLDom.xml);
    OutMsg.Send(0);

    With MSMQ 3.0: MSMQ can send MSMQ Messages to a HTTP queue (another network) i.e [url=Http://computername/msmq/private$]Http://computername/msmq/private$[/url]

    I have tried using [url=Http://computername/msmq/fromNavision]Http://computername/msmq/fromNavision[/url] command, but codeuint does not like this. I need to send a MSMQ message to a ISP server that is hosting the client eCommerce server (to upload stock information etc..). As anyone implement Navision MSMQ to send to another MSMQ on another network or ISP?

    We are using Nav 3.7b

    Regards
  • HushdontspammeHushdontspamme Member Posts: 56
    I can send a MSMQ message from Navision 3.7b using
    'DIRECT=OS:localhost\private$\test' with MSMQ Bus-Adaptor C/AL code

    but i would need to use 'DIRECT=IP:IP_Address\private$\test'

    The moment i change 'DIRECT=OS to 'DIRECT=IP the codeunit will not run. I need to use IP to be able to send to an external IP MSMQ Queue.

    Any advice

    Many Thanks
  • HushdontspammeHushdontspamme Member Posts: 56
    Hi

    I have cracked it:

    Navision 3.7b can MSMQ bus Adaptor can only read Direct=OS and not Direct=IP

    on the Navision automated server where it sends MSMQ message i added the external server name and ip address

    C:\windows\system32\drivers\etc..\host file

    and in then updated 'DIRECT=OS:servername\private$\test' in the codeunit. So when MSMQ sends the message it will lookup the host information for ip address details and away it goes.

    Many thanks to DenSter and Kine

    Regards
  • MBILEKMBILEK Member Posts: 1
    Hello all,

    it took me some time, but finaly figured out correct way how to work with TCP connection with MSMQ. Tested only on outgoing messages.

    step 1. when opening queues, you need to use parameter to tell MSMQ adapter to use TCP addres format.
    MSMQ.OpenWriteQueue(QueueAddress, Protocol, 0)
    protocol set to 0 = 'DIRECT=OS:'
    protocol set to 1 = 'DIRECT=TCP:'

    however the catch is, this defines only the address format, not the message format which needs to be setup seperately

    step 2.
    before sending out message you need to se protocol for message itself.

    MsgOut.Protocol := 1;
    MsgIn := MsgOut.Send(Timeout)
Sign In or Register to comment.