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 » IBM MQ Java / JMS » How do I do segmentation with MQS for Java ?

Post new topic  Reply to topic
 How do I do segmentation with MQS for Java ? « View previous topic :: View next topic » 
Author Message
AlexeiSkate
PostPosted: Thu Apr 11, 2002 7:20 am    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2002
Posts: 123

Hi,
I'm trying to write a program that will load the content of a large file onto a queue as a single message. Since this message can be potentially large, I would like to apply MQSeries segmentation and put segments of the logical msg onto the queue. I've seen a C programming example using MQI that directly manipulate the MQMD structure to set the MsgFlag to MQMF_SEGMENT for each segment and set the MsgFlag to MQMF_LAST_SEGMENT for the final segment. I'm thinking that I have to do something similar on the Java side but don't quite know how. I've read and re-read the "MQseries Using Java" (SC34-5456-07) redbook , but it doesn't list any getter or setter methods that will allow me to get access to the MQMD structure that is encapsulated within the MQMessage object so that I can manipulate the desired fields for segmentation.

If someone can provide some guidance as to how I should proceed and/or point me to some segmentation using Java samples, it would be greatly appreciated. Thanks for anyone's help.

[ This Message was edited by: AlexeiSkate on 2002-04-12 10:53 ]

[ This Message was edited by: AlexeiSkate on 2002-04-12 11:03 ]
Back to top
View user's profile Send private message
AlexeiSkate
PostPosted: Tue Apr 16, 2002 7:56 am    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2002
Posts: 123

Ok, I was able to bypass my problem for now. You can set the putMessageOption variable 'options'to MQC.MQPMO_LOGICAL_ORDER so that the queue manager will automatically keep track of each segment's offset, group id, and message sequence number. Each segment of the logical message will have different offset, but they will all have the same group id and msg sequence number. Before putting each segment onto the queue, set its messageFlag value to MQC.MQMF_SEGMENT. The last segment will need to have its messageFlag value set to MQC.MQMF_LAST_SEGMENT. The problem I had was the the redbook "MQSeries using Java" did not specify what are the valid values to set the messageFlag to when doing a Put command. I had to do some digging in other redbooks to find my solution.
Back to top
View user's profile Send private message
deneb
PostPosted: Wed Apr 17, 2002 8:06 pm    Post subject: Reply with quote

Novice

Joined: 15 Apr 2002
Posts: 18

Hi

Did u try receiving the segmentation messages.. ? Since i am facing some problems

There are 2 ways to achieve this
1- Let QueueManager do the segmentation [i was successful in this]
2- Let the Application do the segmentation [not successful]

any inputs ...
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
AlexeiSkate
PostPosted: Thu Apr 18, 2002 5:52 am    Post subject: Reply with quote

Centurion

Joined: 10 Apr 2002
Posts: 123


Hi Deneb,

I'm not sure I understand your question. Are you asking me if I've tried to get the segments back from the queue, or are you asking me if I was able to do a put onto the queue with the application doing its own segmentation ?

I did a put onto a queue with the application doing the segmentation. My Java program read each record from a file, put it onto a queue with the messageFlag set to MQMF_SEGMENT, except for the last record where it was put onto the queue with the messageFlag set to LAST_MQMF_SEGMENT. I've been trying to play around with the get method to retrieve back my segments from the queue, but I haven't figure out how I can do a loop to get back each segment indivdually. Although I could get back indivdual segment using a single get command, or I could get back the entire logica message when I set the getMessageOption to MQGMO_COMPLETE_MSG.
Back to top
View user's profile Send private message
deneb
PostPosted: Tue Apr 23, 2002 8:49 pm    Post subject: Reply with quote

Novice

Joined: 15 Apr 2002
Posts: 18

Hi

Actually i meant receiving the segmented messages.

i was successful in retrieving the whole message but not parts of it . the same thing that u achieved.

thnx for your reply. if u r successful in retrieving the segment messages through a loop do lemme know

deneb
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
arunmakhija
PostPosted: Wed Nov 06, 2002 5:00 pm    Post subject: Reply with quote

Novice

Joined: 17 Jun 2002
Posts: 20
Location: Sydney

Hi AlexeiSkate

Can you please send me the java program you used to do a put with application segmenation

regards
arun
arunmakhija@yahoo.com
_________________
In Celebration of Being Alive !!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How do I do segmentation with MQS for Java ?
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.