I have to put a files in a queue . The size of a each file is very large ,and hence decided to put a single file each time into queue , so that queue may not be overloaded . i have to put each file into queue only when previus file has been read. i.e once i get a notification from the other side that the file is read, then only i want to put next file.
Can anybdy tellme how this can be done using java and MQseries
If you keep replying to your own questions, experts will think somebody already is in the process of answering the question, and you are less likely to be helped in time. At least, that's how it works for me, if CEHJ beats me to it there is a big chance that the problem has already been solved.
I'm not an expert in MQ, but can't you create a queue that can only contain a single element? Your side would block when trying to supply the next file. If you are able to ask the queue how many elements are contained in the queue, you might be able to poll it and only write a file if there are no elements in the queue. As said, I'm not an expert for MQ, but the reasoning seems to be valid for any queue.
You can ask for a delivery report - setting the proper option (MQRO_COD) in the message descriptor. The report message will be generated when your peer gets the message. In case of large messages be careful NOT to ask full data with the report message. The report will arrive into the reply-to-queuue you can set for the message.