473,950 Members | 48,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading text-only body from MSMQ in C#

Hello,

I have a need to read messages from MSMQ (on the order of 350,000 messages
per day) that have a body that is text-only (not in XML format). There are
3 message formats to select from (XMLMessageForm atter,
ActiveXMessageF ormatter, and BinaryMessageFo rmatter). All samples that I
have found indicate use XMLMessageForma tter, but I am not sure I should use
this because my message is text.

Does anyone know how I should read these messages?
Nov 17 '05 #1
5 6476

"Lee Zeitz" <lz****@comcast .net> wrote in message
news:rL******** ************@co mcast.com...
Hello,

I have a need to read messages from MSMQ (on the order of 350,000 messages
per day) that have a body that is text-only (not in XML format). There
are 3 message formats to select from (XMLMessageForm atter,
ActiveXMessageF ormatter, and BinaryMessageFo rmatter). All samples that I
have found indicate use XMLMessageForma tter, but I am not sure I should
use this because my message is text.

Does anyone know how I should read these messages?

You should read them using whichever message formatter was used to send the
messages. Any of them will work.

David
Nov 17 '05 #2
Lee
Thats the problem. Our company has legacy software written over the
years that submits (from VB 6, VBScript, etc) to the queue. This
software exists company-wide, so it is not possible to re-write all of
it.

I am re-writing our application that reads the information from specific
MSMQs because the old VB6 app that performed this task had memory leaks,
and could not perform threading - which I need to keep up with the
volume of records being read.

My messages will not have an XML header in the body, so I am trying to
figure how Microsoft enables this situation to be handled.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #3
Normally anything sent via VBScript or VB would be using the
ActiveXMessageF ormatter. This is one of your Formatter choices as described
by previous posters.
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Lee" wrote:
Thats the problem. Our company has legacy software written over the
years that submits (from VB 6, VBScript, etc) to the queue. This
software exists company-wide, so it is not possible to re-write all of
it.

I am re-writing our application that reads the information from specific
MSMQs because the old VB6 app that performed this task had memory leaks,
and could not perform threading - which I need to keep up with the
volume of records being read.

My messages will not have an XML header in the body, so I am trying to
figure how Microsoft enables this situation to be handled.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 17 '05 #4
Are there any good examples of this? I have been looking, but only find
examples for the XMLMessageForma tter.

Lee Zeitz

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #5
MessageQueue mqReceive = new MessageQueue(Qu euePath);
mqReceive.Forma tter = new ActiveXMessageF ormatter();
// here call whatever method on mqReceive object (read, peek, BeginReceive,
etc.)
Suggestion: Spend a few hours reading over the MSDN documentation - it will
help you to avoid having to constantly post to newsgroups for the basics and
wait for answers!
Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Lee Zeitz" wrote:
Are there any good examples of this? I have been looking, but only find
examples for the XMLMessageForma tter.

Lee Zeitz

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 17 '05 #6

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

Similar topics

6
12763
by: Suresh Kumaran | last post by:
Hi All, Does anybody know the sytax in VB.NET to write the contents of a multiline text box to a text file? Appreciate help. Suresh
8
18267
by: Phil Slater | last post by:
I'm trying to process a collection of text files, reading word by word. The program run hangs whenever it encounters a word with an accented letter (like rôle or passé) - ie something that's not a "char" with an ASCII code in 0..127 I've searched the ANSI C++ standard, the internet and various text books, but can't see how to workaround this one. I've tried wchar_t and wstring without success. But rather than spending lots of time on...
19
10420
by: Lionel B | last post by:
Greetings, I need to read (unformatted text) from stdin up to EOF into a char buffer; of course I cannot allocate my buffer until I know how much text is available, and I do not know how much text is available until I have read it... which seems to imply that multiple reads of the input stream will be inevitable. Now I can correctly find the number of characters available by: |
1
6775
by: Magnus | last post by:
allrite folks, got some questions here... 1) LAY-OUT OF REPORTS How is it possible to fundamentaly change the lay-out/form of a report in access? I dont really know it that "difficult", but listen up; Reports, the way I look at them, all present data downwards, in this way; TITLE data
2
2510
by: Sabin Finateanu | last post by:
Hi I'm having problem reading a file from my program and I think it's from a procedure I'm using but I don't see where I'm going wrong. Here is the code: public bool AllowUsage() { OperatingSystem os = Environment.OSVersion; AppDomain ad = Thread.GetDomain();
21
13174
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the server is on one line (\r\n at end) and is formed as - each of which is seperated by a space. Arguments with spaces in them are enclosed in quotations. So, I'm able to open a connection to the server. When I send a message to
1
2031
by: Need Helps | last post by:
Hello. I'm writing an application that writes to a file a month, day, year, number of comments, then some strings for the comments. So the format for each record would look like: mdyn"comment~""comment~"\n Now, I wrote some code to read these records, and it works perfectly for every date I've tried it on, except when the day is 26. I tried saving a record for 6/26/2004 and 7/26/2004 and it read it in as the day, year, and number of...
2
1873
by: Mad Scientist Jr | last post by:
i'm trying to read a file byte by byte (and later alter the data and write it to a 2nd file byte by byte) and running into a problem where it seems to keep reading the same byte over and over again (an endless loop). i thought that BinaryReader.ReadByte advanced to the next byte? i had it time out after 1000 iterations, and keeps outputting the same byte. any help appreciated, my code is below: Imports System.io
3
9888
by: vbnewbie | last post by:
I've been testing some of the example streamreads on 40 meg text file. I notice that it take awhile to read in debug.write and textbox1.text multi line. but if i use a textpad program, example editplus, it loads a lot quicker. My question is... what is the limitation here or is there something that can be done different for faster reading?
4
12817
by: Amit Maheshwari | last post by:
I need to read text file having data either comma seperated or tab seperated or any custom seperator and convert into a DataSet in C# . I tried Microsoft Text Driver and Microsoft.Jet.OLEDB.4.0 to read text file but could not get the data in correct format. All columns are not coming in dataset and rows are messing up. Suggestions please ???
0
11191
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10703
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9904
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8268
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6231
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6352
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3558
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.