Author |
Message
|
pradeeps |
Posted: Mon Nov 27, 2006 11:20 am Post subject: Standalone Java client writing a message to a queue |
|
|
Newbie
Joined: 27 Nov 2006 Posts: 2
|
Hello,
This is my first post. If the question is too simle...my apologies...
In our application environment we have users taking large files (1GB+) and FTPing and them to our servers. There are some processes that get triggered based on a file being FTPed. There are all sorts of problems associated with this approach.
Hence I was looking at using MQ. In this case the users would directly write the file contents to a queue using a standalone application. Hence I am assured that the processes (the MDBs) will not get triggered until the whole message has "arrived".
Just wanted to see how sound this approach was. Any pointers? _________________ Pradeep Shekade
CISSP, SCEA |
|
Back to top |
|
 |
vennela |
Posted: Mon Nov 27, 2006 12:00 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
What version of MQ are you using
1 GB+ is a very large amount and AFAIK, segmentation is not supported using JMS |
|
Back to top |
|
 |
xxx |
Posted: Mon Nov 27, 2006 10:03 pm Post subject: |
|
|
Centurion
Joined: 13 Oct 2003 Posts: 137
|
You can send a Priority Message at the end to indicate the end of the file and trigger the Queue, i.e the queue is setup for the priority and at the end you send a Priority message , Rest are all Ordinary Messages, |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 2:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
xxx wrote: |
You can send a Priority Message at the end to indicate the end of the file and trigger the Queue, i.e the queue is setup for the priority and at the end you send a Priority message , Rest are all Ordinary Messages, |
Or you could just use logical grouping. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pradeeps |
Posted: Wed Nov 29, 2006 5:08 am Post subject: |
|
|
Newbie
Joined: 27 Nov 2006 Posts: 2
|
Thanks a lot for your replies. I could not get to working on this immediately after I posted the question here.
The version that we have is 5.3.0
I was looking at a scenario where a java client running remotely could connect to a MQ server and upload a huge file.
The constraint really appears to be the size of the message. From your replies it looks like I would have to break the huge file into segments of messages and then somehow put them back together on the receiving end in the right sequence to form the file again.
I was trying to find out the maximum possible size of a message in MQ 5.3. and any other constraints. Can you point me to a documentation?
Thanks _________________ Pradeep Shekade
CISSP, SCEA |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 29, 2006 5:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Maximum message size in 5.3 is 100Mb but there's a separate limit on size over a client connection. AFAIK that limits a Java client to 4Mb because Java doesn't / can't use client connection tables until v6.
I look to other posters with better Java skills to confirm or refute this.
As an aside, I'd apply CSD 12 sooner rather than later to a 5.3 queue manager. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 29, 2006 5:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Maximum message size in all versions later than 5.0 is 104857600. This includes 6.x. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jcrmqput |
Posted: Thu Dec 14, 2006 2:32 pm Post subject: |
|
|
Newbie
Joined: 14 Dec 2006 Posts: 3
|
I'm not sure if you've already written the java application to read the file and put it into a message. My advice is breaking up the file into multiple grouped messages, then put the file back together when you do your Get.
We've written a java application to put/get files to/from MQ. The only reasonable way was to break up the file into smaller messages and grouping them. In our case anything larger than 4MB would get broken up. The RAM requirements of reading a very large file into 1 message was huge. |
|
Back to top |
|
 |
mapa |
Posted: Tue Jan 09, 2007 6:17 am Post subject: MQ V6 File transfer application |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
This could be an option if you can upgrade to V6.
Since it sounds as if your users do this manually already?
From the MQ File Transfer Application FAQ:
Quote: |
What is the maximum size of a file I can send?
It is possible to send files of up to 2 GB, although this is not recommended. For normal purposes it is possible to send and receive large files (10 MB). When you send a file, the file is typically broken up into chunks that are 100 KB each; when you receive a file, the chunks are put back together so that you receive the complete file. |
You could improve your current ftp approach by letting the user upload the file to one directory, and then rename it to the destination (or same directory but with different file suffix) A move/rename is "instant" so that your other program will then only see the file when it is complete. |
|
Back to top |
|
 |
|