Send XML Message to remote IP message queue

SteveSteve Member Posts: 81
Hello All,

I have two machines that need to keep specific table data in sync.

1. I created a process that will convert all the changes in actions and send them in XML format to another computer's message queue.

2. The other computer will monitor the queue, retrieve the message and act upon the actions.

All this works perfectly as long a the queue is on the same network or machine ALPHA can communicate with machine BRAVO.

I need the ability to send the message to a IP across the internet to a remote machines message queue.

A bit of the code I researched is below, but I continue to get errors in the OPENWRITEQUEUE command.


This works fine

Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);

CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('.\private$\toNavision',0,0);

OutMsg := CC2.CreateoutMessage('Message [url=queue://]queue://[/url].\private$\toNavision');
OutS := OutMsg.GetStream();

XMLDom.save(OutS);
OutMsg.Send(0);

This does not work, but is the concept I'm looking for.

Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);

CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision',0,0);

OutMsg := CC2.CreateoutMessage('FormatName:Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision');
OutS := OutMsg.GetStream();

XMLDom.save(OutS);
OutMsg.Send(0);

](*,)

Thanks in advance

Steve
Steve

Comments

  • jlandeenjlandeen Member Posts: 524
    When you're working with Message Queues across domain lines will the private message queue still be accessible?

    Have you tried making the destination message queue public?
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.