MSMQ body format issue.

I

IdleBrain

I wrote an application that puts in a message into MSMQ using C++ and
MFC. If I try to put a message called 'sample' I see that the body of
the
message in MSMQ would be set to: 's.a.m.p.l.e'.

On the other hand I have a C# application that reads the same message
queue and it expects the body format to be:
'<?xml version="1.0"? >..<string>sample</string>'


Because of this body format incompatibility, I am having trouble with
C# application not being able to read the C++ application's message.
Can someone suggest on how to modify the C#/C++ application to resolve
this issue.

Thanks,
IdleBrain
 
J

John Vottero

IdleBrain said:
I wrote an application that puts in a message into MSMQ using C++ and
MFC. If I try to put a message called 'sample' I see that the body of
the
message in MSMQ would be set to: 's.a.m.p.l.e'.

On the other hand I have a C# application that reads the same message
queue and it expects the body format to be:
'<?xml version="1.0"? >..<string>sample</string>'


Because of this body format incompatibility, I am having trouble with
C# application not being able to read the C++ application's message.
Can someone suggest on how to modify the C#/C++ application to resolve
this issue.

You are using different Formatters. Set the MessageQueue.Formatter property
to be the same in both apps.
 
I

IdleBrain

Thanks for your help guys.

I started using the ActiveXMessageFormatter and XMLMessageFormatter in
my C# application to read either of the message queue formats and
donot have a problem now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top