MSMQ and IP Address

MTCMTC Member Posts: 159
Hi,

I have a project that involves MSMQ messages and NAS. Now, as I've never used MSMQ messages before, I have been doing several tests using two Navision clients, each running a form. One is acting like the NAS, the other as whatever external application. Both are running on the same machine.

Now, this is the problem. Everything works fine when I am using the name of the machine to identify the queue to which I want to send the message. However, when I change this to the IP address (remember it's the IP address of my machine) the message never gets received by the form acting as a server.

Works
OutMsg := CC2.CreateoutMessage('Message queue://mymachine\private$\ptoNavision');

Doesn't work:
OutMsg := CC2.CreateoutMessage('Message queue://192.168.1.xx\private$\ptoNavision');

Does anyone have a clue as to why this might be? As I've said, I've never done this before, so the problem could be something very simple and very silly.

Comments

  • nunomaianunomaia Member Posts: 1,153
    Private queues are local to server and are not available to other servers. Private queues are not published in Active Directory. Convert it to a public queue.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • MTCMTC Member Posts: 159
    Thanks, but it makes no difference. The form acting as the server does not receive the message, and thus the form acting as the client times out on
    ReturnMessage := OutMsg.SendWaitForReply(5000);
    

    Yet works fine using the machine name.

    Also, are public queues only available to systems in the same domain however? What if I wanted to send an MSMQ message outside of the domain?
  • nunomaianunomaia Member Posts: 1,153
    Yes you are right, I was checking old data :) and you can use remote private queues.

    The format for remote private queues is DIRECT=server\PRIVATE$\QueueName and not server\PRIVATE$\QueueName. If I’m not in mistake DIRECT keyword means to resolve queue without AD.

    Don’t forget to assign correct permissions in message queue, or you won’t be able to write to queue.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
Sign In or Register to comment.