Hello together,

I’m struggeling already for years to get MSMQ integrated into Navision but it does not work properly.

Why is a public queue named nsadminreceivequeue being generated when I send to a “test” queue ?

Here my code:


OutMsg := ComCom.CreateoutMessage(‘Message queue://.\test’);
OutStrm := OutMsg.GetStream();

CU2 (single instance):


ComCom::MessageReceived(VAR InMessage : Automation “’’.IDISPATCH”)
InMsg := InMessage;
InStrm := InMsg.GetStream();
MESSAGE(TEST + ’ Received’);

CU2 only works if I change the OpenReceiveQueue from “.\test” to “.\nsadminreceivequeue” and I promise I did not create the MessageQueue.

Can anyone enlighten me on how to correctly communicate between two Navision Clients using MSMQ ?

What about rules and triggers in the MSMQ ? What is their purpose and how to set them up to “synchronize” between two different machines ?

There is a file called ‘devguide.chm’ on the product cd, somewhere in the additional interfaces folder, I always have a hard time finding it. In this helpfile are code samples to do this type of thing.

I used to have a demo app for this, I’ll see if I can find it and if I can figure out why your code isn’t working.


you can find the helpfile here \Attain 3.60\Nas\Common\Navision\Communication Component\devguide.chm

I noticed a difference in the function AddBusAdapter(), where you have “1” as second parameter. I don’t know the meaning of it, but in the example it is “0”.

best regards


Thank you for your information.

I know those examples and the devguide.chm. But to add more information to that:

The problem is not inside Navision or inside the C/AL code or within the Bus Adapters.
We are currently implementing communication using Named Pipes and TCP sockets quite successfully.

The problem is more that the Out-MessageQueue is being filled up but the messages are not being transferred to the remote machine. It shows the IP address of the target machine ( in the “Next Hop” property of the message. My IP is ( so both machines are in the same network and is even running as my database server. So the physical connection (routing) between the two machines should be no problem. Both machines are running XPSP2 with firewall activated, anyway “Message Queuing” is in the exception list and checked on both machines.

I have no idea where the problem exists.

I read about “independant clients” for message queuing which would not have the need for a Message Queue Server. Are there any prerequisitions I need to take into account when setting up the Message Queue Service on a Windows Machine ?

Do you have permission to read the test queue? I remember having a few problems with permissions. It was a while ago so I can’t remember the details.

Just in case: Right click on the queue in the Computer Management console and choose Properties, there should hopefully be a Security Tab.

Yes, I set full permission to everyone. On both machines actually.

I have no clue what is going on in MSMQ. Apparantly, today it works. I don’t know why. All I did was uninstall/reinstall the MSMQ. This is a very weird thing actually.

Anyway, thx for your input. I will mark this topic as resolved.

Oh for the installation of the MSMQ it is important to only install the common objects, and optionally triggers. If you install more than that it becomes very finicky and unpredictable. I’ve had many MSMQ issues related to this:

  • installing more than common objects and triggers
  • transactional vs non-transactional queues (messages disappearing into the twilight zone)
  • having different versions of fin.exe/finsql.exe and nas.exe. even different builds of the same version caused problems
  • double byte characters, like Unicode, are not supported by the Navision MSMQ Busadapter.
    That’s off the top of my head.