Author |
Message
|
team |
Posted: Tue Apr 15, 2008 5:29 am Post subject: File Transfer through MQ |
|
|
Centurion
Joined: 03 Nov 2006 Posts: 108
|
Hi All
I have a group of messages to be sent via MQ.
But I need to send these messages in a File.Is the File transfer through queues possible?
If yes,what is the procedure i should follow.
Thanks in advance |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 15, 2008 5:31 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Files are not messages. MQ only sends messages.
There are a lot of ways to use MQ to "send" files.
there's a File Transfer Application that comes with MQ v6, for example.
Lots of discussion on this topic.  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Apr 15, 2008 8:07 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
read the content of the file and send it using 'BytesMessage'. put the file name in the message header (MQRFH2 usr folder shall be of help). That way your listener on the other end can read the message, get the filename from the header and write the payload to a file of that name.
or else Read the input file. Append it into a StringBuffer object and write that object into the queue. Read from the queue and write back the contents into a file
Another way could be to use a JAVA based FTP API. I googled for one and found this: http://www.jmethods.com/products/ftpapi/ (new thing for me too)
The best way would be to use Server File Transfer Application of MQ itself. _________________ Cheers |
|
Back to top |
|
 |
jeevan |
Posted: Wed Apr 16, 2008 8:07 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
AkankshA wrote: |
read the content of the file and send it using 'BytesMessage'. put the file name in the message header (MQRFH2 usr folder shall be of help). That way your listener on the other end can read the message, get the filename from the header and write the payload to a file of that name.
or else Read the input file. Append it into a StringBuffer object and write that object into the queue. Read from the queue and write back the contents into a file
Another way could be to use a JAVA based FTP API. I googled for one and found this: http://www.jmethods.com/products/ftpapi/ (new thing for me too)
The best way would be to use Server File Transfer Application of MQ itself. |
or if this requirement is for regularly transfering files in big numbers , you can look into PM4DATA. PM4DATA uses MQ network to transfer files with much flexibility. |
|
Back to top |
|
 |
team |
Posted: Thu Apr 17, 2008 4:58 am Post subject: Thanks |
|
|
Centurion
Joined: 03 Nov 2006 Posts: 108
|
hi
thanks a lot for ur replies...have started working on the suggestions..
Thanks again  |
|
Back to top |
|
 |
|