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 » WebSphere Message Broker (ACE) Support » Inserting at beginning of queue (top of queue)

Post new topic  Reply to topic
 Inserting at beginning of queue (top of queue) « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Tue Jun 02, 2009 4:41 am    Post subject: Inserting at beginning of queue (top of queue) Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

Is there any way by which i can insert a message at the beginning of the queue through my ESQL code?

Though the basic concept of queue is FIFO, there is something called as Double-Ended queue. I just want to know if this kind of concept is available in MQ-MB, to insert a message at the beginning of the queue rather than at the end?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 02, 2009 4:44 am    Post subject: Reply with quote

Grand High Poobah

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

The only mechanism available is the message priority. Note that the sending application doesn't "insert" the message in WMQ, the software delivers it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Jun 02, 2009 4:53 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Vitor wrote:
The only mechanism available is the message priority. Note that the sending application doesn't "insert" the message in WMQ, the software delivers it.


Can you please explain me how to set the Message Priority for each message?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Jun 02, 2009 4:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kash3338 wrote:
Vitor wrote:
The only mechanism available is the message priority. Note that the sending application doesn't "insert" the message in WMQ, the software delivers it.


Can you please explain me how to set the Message Priority for each message?


With a SET statement, at least in ESQL. That sets the Priority field, on the MQ Message Descripter.

Doing this is meaningless unless the app reading the queue is using priority.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 02, 2009 4:58 am    Post subject: Reply with quote

Grand High Poobah

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

kash3338 wrote:
Vitor wrote:
The only mechanism available is the message priority. Note that the sending application doesn't "insert" the message in WMQ, the software delivers it.


Can you please explain me how to set the Message Priority for each message?


It's a property of the message, set according to how the language you're using deals with the MQMD (it's a different method between C & Java for instance).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Jun 02, 2009 5:37 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

How do i set the priority of a message in MQMD through ESQL?
Back to top
View user's profile Send private message Send e-mail
AkankshA
PostPosted: Tue Jun 02, 2009 7:50 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

SET OutputRoot.MQMD.Priority = <number you want to assign>

but make sure receiving application is picking the message in priority order and not in FIFO
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Tue Jun 02, 2009 8:00 pm    Post subject: Reply with quote

Grand High Poobah

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

kash3338 wrote:

Can you please explain me how to set the Message Priority for each message?

Your question doesn't make much sense. If you set priority on each message they will still be delivered FIFO within the priority.

A queue is not a stack. May be you would be better served with message expiry.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kash3338
PostPosted: Wed Jun 03, 2009 4:56 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

AkankshA wrote:
SET OutputRoot.MQMD.Priority = <number you want to assign>

but make sure receiving application is picking the message in priority order and not in FIFO


Hi AkankshA, Thanks for your reply. I just want to know this,

How can we get the messages by priority through MQGet?
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Wed Jun 03, 2009 5:45 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You don't.

MQ will present them in priority order if the queue is so ordered (and you don't use other match criteria).

It's possible to make an application use priority with NO code changes by using alias queues for different MQPUT apps with different default priority values and the receiver queue has priority order.

As if by magic - you can get different priority by simply choosing a different alias queue name for the PUT.
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 » WebSphere Message Broker (ACE) Support » Inserting at beginning of queue (top of 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.