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 API Support » Removing a Message from a Queue by JMSid (using XMS)

Post new topic  Reply to topic
 Removing a Message from a Queue by JMSid (using XMS) « View previous topic :: View next topic » 
Author Message
major7
PostPosted: Mon Jul 07, 2008 4:11 am    Post subject: Removing a Message from a Queue by JMSid (using XMS) Reply with quote

Novice

Joined: 26 Jun 2008
Posts: 12

Hi all,

I'm making some progress and have basic understanding of how MQ works

I need only to get one more little thingy done in order to be happy : Remove a message from a queue. As far as I have understood, this should be possible by consuming it, right? Well, It can hardly be necessary to get all messages and search the wanted one programmatically, can it?

The forum's search resulted in some topics that were the nearly ticket, but haven't got an answer for me.

So, here's what I do :
Code:

IMessageConsumer consumer = this.session.CreateConsumer(this.destination, "JMSMessageId='"+message.JMSMessageID+"'" );
IMessage msg = consumer.Receive(5000);


msg should, in my understanding contain the Message specified by the selector i used before, but it is null on every call. Can anyone tell me what I'm doing wrong? destination and messageID are both set, messageID is something like :

ID:414d512054515830372020202020202047f9b8a320071806

and furthermore, will this call to Receive suffice to remove the message from the queue? Or will I have to do something else?

thanks a lot in advance

Sebi
Back to top
View user's profile Send private message
major7
PostPosted: Mon Jul 07, 2008 4:27 am    Post subject: Reply with quote

Novice

Joined: 26 Jun 2008
Posts: 12

well, obviously this code does work when i insert blank spaces here:

"JMSMessageId = '"+message.JMSMessageID+"'"
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 API Support » Removing a Message from a Queue by JMSid (using XMS)
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.