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 » Messagefilter

Post new topic  Reply to topic
 Messagefilter « View previous topic :: View next topic » 
Author Message
saxofun
PostPosted: Fri Sep 06, 2002 5:13 am    Post subject: Messagefilter Reply with quote

Newbie

Joined: 30 Jul 2002
Posts: 5

Hello together

Is it possible to receive messages from a queue only for a given
correlationID ? I got the following problem. I want to write a
method like this public String getMessage(String correlationID).
But as I now you always got the first message on the queue if
you call receive(). And if the first message isn't the one with the
corresponding correlationID I've to persist it somewhere. So my
question is:

Is there a possibility with MQ and Java to look on a queue and
receive only those messages I need ?

thanks in advance
Saxo =)
Back to top
View user's profile Send private message
clindsey
PostPosted: Fri Sep 06, 2002 9:05 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

In the MQQueue::get call, you pass in a message object.
Just set the correlationId field in the message object before the get call and the get will return the message you want. correlationId is a byte array of 24 bytes.

Charlie
Back to top
View user's profile Send private message
maxis
PostPosted: Mon Sep 09, 2002 7:33 am    Post subject: Reply with quote

Centurion

Joined: 25 Jun 2002
Posts: 144

hi saxofun

Take look at the MessageListener interface.

U can specify message selector, can be corl-ID, for message listener, which in turn will pick the message which matches the criteria. And can specify the receive time.

If u couldnt solve the problem let me know ... may be i'll send u the snippet of code

M
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 » IBM MQ Java / JMS » Messagefilter
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.