|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Removing a Message from a Queue by JMSid (using XMS) |
« View previous topic :: View next topic » |
Author |
Message
|
major7 |
Posted: Mon Jul 07, 2008 4:11 am Post subject: Removing a Message from a Queue by JMSid (using XMS) |
|
|
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 |
|
 |
major7 |
Posted: Mon Jul 07, 2008 4:27 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|