473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Microsoft Message Queue

Hi All,

I am trying to read and write to a message queue. (System.Messaging) I can
read and write to a queue. However, the consummers of the queue messages are
going to be a mixed bag of application, some of which I do not have control
over. When I send a message to the queue, the body of the message is
formatted into XML. I do not want this to happen. I just want to put my data
directly into the body as is, without .NET putting XML wrappers around it.

Anyone know how to accomplish this?

Steve
Nov 16 '05 #1
2 2738
You can use the BinaryMessageFormatter or ActiveXMessageFormatter to
serialize messages without using XML. By default, the XML formatter is
created and associated when the queue object is created in your application.
Just create one of the other formatters and assign it to the formatter
property.
Dale

"Steve Lutz" <sl*********@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi All,

I am trying to read and write to a message queue. (System.Messaging) I can
read and write to a queue. However, the consummers of the queue messages are going to be a mixed bag of application, some of which I do not have control over. When I send a message to the queue, the body of the message is
formatted into XML. I do not want this to happen. I just want to put my data directly into the body as is, without .NET putting XML wrappers around it.

Anyone know how to accomplish this?

Steve

Nov 16 '05 #2
Steve,
How is your data represented now? What do you mean by "as is"?

As Dale stated: If you are using the Message.Body property your choices are
BinaryMessageFormatter, ActiveXMessageFormatter, or XmlMessageFormatter. Or
you could write your own Formatter (by implementing IMessageFormatter) to
get the specific format you want...

Alternatively you could set the Message.BodyStream to a System.IO.Stream
(for example a MemoryStream) instead of setting the Message.Body property.

For details on how the Message.Formatter, Message.Body & Message.BodyStream
interact see the Message.BodyStream topic in the online help.

Hope this helps
Jay
"Steve Lutz" <sl*********@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi All,

I am trying to read and write to a message queue. (System.Messaging) I can
read and write to a queue. However, the consummers of the queue messages are going to be a mixed bag of application, some of which I do not have control over. When I send a message to the queue, the body of the message is
formatted into XML. I do not want this to happen. I just want to put my data directly into the body as is, without .NET putting XML wrappers around it.

Anyone know how to accomplish this?

Steve

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary | last post by:
I am planning to implement application to application communication using message queueing. I am using VB.NET on a Win2000 server OS with message queueing services enabled. I am find the...
4
by: jabailo | last post by:
I came across this article while researching a VB6 430 error: INFO: Considerations for Server-Side Automation of Office http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757 ...
2
by: Rodrigo GarcĂ­a | last post by:
Hi. The problem is a bit hard to explain. I have a ServicedComponent method which runs a distributed transaction consisting on a a MessageQueue reception and several database operations. That...
1
by: tiger | last post by:
Hi, I have a question on Microsoft Message Queue. How do I give higher priority to messages and get it process before others. I will like to use the mechanism supplied by the queue service...
6
by: les | last post by:
Here's a class which uses 2.0 generics to implement an inter-thread message queue in C#. Any number of threads can post and read from the queue simultaneously, and the message object can be any...
1
by: Andrew Robert | last post by:
Hi everyone, Could someone help explain what I am doing wrong in this code block? This code block is an excerpt from a larger file that receives transmitted files via IBM WebSphere MQSeries...
2
by: Eugene Anthony | last post by:
I am having a problem with my try and catch found in the code bellow. It never works when there is no msg in the queue. The code bellow is to read and process one message at a time. Upon completing...
1
by: davidcollins001 | last post by:
Hi, I am trying to implement a blocked or synchronous method of message passing using signal interrupts. So far I have the following: server.c { msgget(queue) msgrcv (queue mtype) ...
2
by: bernd | last post by:
Hi netties, posted this in a different group already, which seems to be inappropriate. I create a message queue with msgget(), sent a 5-byte message to it with msgsnd() and try to receive the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.