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 » General IBM MQ Support » Removing messages from the QUEUE

Post new topic  Reply to topic
 Removing messages from the QUEUE « View previous topic :: View next topic » 
Author Message
ashu
PostPosted: Tue Feb 06, 2007 1:15 am    Post subject: Removing messages from the QUEUE Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Hi,
How do I remove messages from the LQ without actually using MQGET in any of its forms...
Thank you.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 06, 2007 1:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

There's only one MQGET, it just takes different options.

Do you mean programatically or administratively? It's the only way within a program, but adminsitrators can use clear queue commands.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ashu
PostPosted: Tue Feb 06, 2007 1:37 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

its Administratively...actually my sender is JMS complaint while reciver is not...so the receiver can't understand the message and cant MQGET it ...
I just wanted to refresh the queues..i couldn't remember how....


Last edited by ashu on Tue Feb 06, 2007 1:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Anirud
PostPosted: Tue Feb 06, 2007 1:41 am    Post subject: Reply with quote

Master

Joined: 12 Feb 2004
Posts: 285
Location: Vermont

Vitor wrote:
adminsitrators can use clear queue commands.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Feb 06, 2007 1:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ashu wrote:
its Administratively...actually my sender is JMS complaint while reciver is not...so the receiver can't understand the message and cant MQGET it ...
I just wanted to refresh the queues..i cant remember how....


Then the System Admin guide will be your new best friend.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 06, 2007 2:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ashu wrote:
its Administratively...actually my sender is JMS complaint while reciver is not...so the receiver can't understand the message and cant MQGET it ...


Not strictly true btw - message content is irrelevant to the get. The receiver may not be able to interpret the message immediately, but even that's a fairly straigtforward job of removing (or interpreting) the RFH2 header JMS has added.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 06, 2007 4:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

ashu wrote:
its Administratively...actually my sender is JMS complaint while reciver is not...so the receiver can't understand the message and cant MQGET it ...
I just wanted to refresh the queues..i couldn't remember how....


Have your JMS sender use an URI for the Destination definition and make sure they add the targetClient part:
Code:
session.createQueue("queue://MYQMGR/DESTINATIONQUEUE?targetClient=1");


This should allow your non JMS program to read the message without problems.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ashu
PostPosted: Tue Feb 06, 2007 4:15 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

fjb_saper wrote:
ashu wrote:
its Administratively...actually my sender is JMS complaint while reciver is not...so the receiver can't understand the message and cant MQGET it ...
I just wanted to refresh the queues..i couldn't remember how....


Have your JMS sender use an URI for the Destination definition and make sure they add the targetClient part:
Code:
session.createQueue("queue://MYQMGR/DESTINATIONQUEUE?targetClient=1");


This should allow your non JMS program to read the message without problems.

Enjoy


I would greatly appreciate it if you explain the code
thank you
regards
Ashu
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 06, 2007 4:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It is all explained in the using Java manual (link documentation at the top of the page ...

This is the programmatic equivalent of the JNDI setting target client = MQ.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ashu
PostPosted: Tue Feb 06, 2007 4:23 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

fjb_saper wrote:
It is all explained in the using Java manual (link documentation at the top of the page ...

This is the programmatic equivalent of the JNDI setting target client = MQ.

Enjoy


Thank you for the pointer...

Regards

Ashu
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 06, 2007 4:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ashu wrote:
I would greatly appreciate it if you explain the code


There's a Java manual you might find an informative read but in summary JMS adds a header to it's messages which is used for various purposes described in the manual & which I don't plan to repeat here. This information is (obviously) added to the MQ message in the form of an RFH2 header. A JMS application reading the message will expect this header, a non-JMS will not.

You therefore have 2 options - code the non-JMS application to expect & process the extra header information or use the code supplied by fjb_saper to suppress the header.

Searching either this forum or the manual for 'targetclient' would have yielded much the same information, and you wouldn't have had the delay in receiving a response.

I also commend the Java manual to you if you want a more detailed explaination of the mapping between JMS and MQMD/MQRFH2 than the rather simplistic one I've given here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ashu
PostPosted: Tue Feb 06, 2007 4:40 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Vitor

Greatly benefitted...thanks a lot


Regards
Ashu
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 » General IBM MQ Support » Removing messages from the QUEUE
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.