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
0
Comments
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
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.
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
'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
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
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)