ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » mqseries api - sending data from a file

Post new topic  Reply to topic
 mqseries api - sending data from a file « View previous topic :: View next topic » 
Author Message
andyfives
PostPosted: Tue Dec 15, 2009 8:36 am    Post subject: mqseries api - sending data from a file Reply with quote

Newbie

Joined: 09 Dec 2009
Posts: 9

Hello there (again),

We can now send a string from the client application we are building onto our test queue. This works great.., but

We would really like to send a data from a file (of variable size) to the queue.

And I looked into this building a Logical Unit of Work (LUW) process that the old client program used where we
- start the connection,
- start the LUW
- MQPUT each line of the file into this LUW
- then COMMIT it.

We tried to use the MQBEGIN method, but found out that you can place a MQPMO_SYNCPOINT value in the options for the first MQPUT and that should work.

But we are still sending a message for each MQPUT we make. Is there something obvious I am missing? Is there an easier way to work with files?

We have to replace really 'like for like' and as LUW is used today it would be great if we could replicate this.

Any advise would be appreciated.. Thanks

Andy
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Dec 15, 2009 8:44 am    Post subject: Re: mqseries api - sending data from a file Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

andyfives wrote:
But we are still sending a message for each MQPUT we make.


That is exactly and completely the definition of what MQPUT does.

It Puts a single message.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 15, 2009 10:31 am    Post subject: Re: mqseries api - sending data from a file Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

andyfives wrote:
But we are still sending a message for each MQPUT we make. Is there something obvious I am missing?


Yes. Each put is supposed to send a message; that's kind of the point. If you want the file as a single message, assemble it as a single message and put it. You're allowed 100Mb as a single message (though a spot of configuration is needed for greater than 4Mb).

andyfives wrote:
Is there an easier way to work with files?


Buy FTE or another commercial solution rather than reinvent the wheel. Files can be tricky. As you've discovered.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
andyfives
PostPosted: Tue Dec 15, 2009 10:39 am    Post subject: Reply with quote

Newbie

Joined: 09 Dec 2009
Posts: 9

Ok, that sounds good.
We'll not go over the 4mb, so we'll assemble it into 1 message.
Thanks for feedback.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Dec 16, 2009 5:05 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

If you use multiple MQPUTs the CMIT or BACK will apply to all of them under one UOW.

Using one message is not really scalable, not is it really the correct MQ model which is closer to a message per record or data item than just transporting a file in a message. You can use grouping if necessary.

Even reading a file means that you are not producing messages directly from the application which is the true messaging model.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » mqseries api - sending data from a file
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.