Send/Receive from MSMQ

wayne

New Member
We currently have a Progress based Financials System, and Payroll Time Card Entry system. Also, we are currently finalizing a decision for purchasing a EAM (Enterprise Asset Management) system which is SQL based. One of the products we are reviewing uses Microsoft Message Queuing (MSMQ) for sending and receving XML messages to allow an integration point. We need to send GL accounts, employee info, vendor info to the EAM product and need to receive invoices and gl trx from it. The new product apparently will create an XML message for an event from their system when add/modify/delete/custom event happens. From Progress 4GL v9.1D or 8.3c, how can we send a XML to the MSMQ and receive one? Be able to Publish and Subscribe? I have suggested using Sonic's product but management wants me to look at directly working with MSMQ instead so more licenses are not needed. Any help would be so gladly appreciated. Thanks guys!!
 
Hi,

I think that one way to do this is using java. create a function to send and call it from progress, when my vendor support came to show how sonic works they used java samples, so i think u can do the same. ask your support how to do this. i´m pretty sure that 9.1d do this but 8.3c i dont know.

Marco Aurelio
 
Here is some simple code that connects to a queue and sends a message, you should be able to build on this.

Code:
&scoped-define MQ_SEND_ACCESS 2
&scoped-define MQ_DENY_NONE 0
&scoped-define MQ_SINGLE_MESSAGE 3
 
def var MSMQ_Info as com-handle.
def var MSMQ_Queue as com-handle.
def var MSMQ_Message as com-handle.
 
create "MSMQ.MSMQueueInfo" MSMQ_Info.
MSMQ_Info:pathname = ".\private$\MyQueue".
MSMQ_Info:label = "Test Message Queue".
MSMQ_Queue = MSMQ_Info:open({&MQ_SEND_ACCESS}, {&MQ_DENY_NONE}).
 
create "MSMQ.MSMMessage" MSMQ_Message.
MSMQ_Message:label = "First Test Message".
MSMQ_Message:Body = "This is the message body".
MSMQ_Message:send(MSMQ_Queue, {&MQ_SINGLE_MESSAGE}).
 
MSMQ_Queue:close.
release object MSMQ_Message.
release object MSMQ_Queue.
release object MSMQ_Info.
 
Back
Top