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 » Circular Queue

Post new topic  Reply to topic
 Circular Queue « View previous topic :: View next topic » 
Author Message
MQWays
PostPosted: Tue Apr 29, 2008 2:25 am    Post subject: Circular Queue Reply with quote

Acolyte

Joined: 20 Jan 2008
Posts: 61

Just like circular logs, is there something like circular queue. For e.g. if the MAXDEPTH on the queue is set to 1000, every subsequent put after hitting the limit should execute successfully in FIFO manner i.e. purging out the oldest message.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Apr 29, 2008 2:29 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

never heard about such a queue

Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Apr 29, 2008 2:31 am    Post subject: Re: Circular Queue Reply with quote

Grand High Poobah

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

MQWays wrote:
Just like circular logs, is there something like circular queue.


No.

The queues are not design to hold information long term so messages shouldn't build up. Certainly there's a risk (in the scenario you quote) that the assured delivery model of WMQ would be broken. If the oldest message was persistent & unread, it would be lost before it was processed despite being accepted for delivery by WMQ.

It sounds like what you need is to set message expiry to some value equal to maximum time the message has a value to the business, or use durable subscriptions to obtain the latest copy of a given message.

But I could be hearing your requirement wrong.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 29, 2008 2:39 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

you can learn circular queue in the Data Structure Book.

there is no concept of circular queue here...


Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 29, 2008 3:31 am    Post subject: Reply with quote

Grand High Poobah

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

Are you trying to mimick a publication with retention?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Tue Apr 29, 2008 3:49 am    Post subject: Re: Circular Queue Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

MQWays wrote:
Just like circular logs, is there something like circular queue. For e.g. if the MAXDEPTH on the queue is set to 1000, every subsequent put after hitting the limit should execute successfully in FIFO manner i.e. purging out the oldest message.

Interested to know what requirements lead to this design being considered.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 29, 2008 3:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If one could rely on the rate at which messages are put to the queue, one could rely on expiration to remove messages from the queue.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 29, 2008 3:50 am    Post subject: Reply with quote

Grand High Poobah

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

fjb_saper wrote:
Are you trying to mimick a publication with retention?


I meant that!

Why my fingers typed "durable subscription", which is something else again, is anyone's guess.

(Guesses containing the concept "you're an idiot" may be close to the truth!)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mdncan
PostPosted: Tue Apr 29, 2008 7:04 am    Post subject: Reply with quote

Acolyte

Joined: 11 May 2005
Posts: 59
Location: US

It doesn't make sense to compare the logging vs queue depth, net sure what's your business requirement? You should look at other alternates viz., increasing the max depth and creating cluster of applications to read and process the messages. if the queue is audit queue then you can purge them at the end of the day.


Pl. post your requirement so that people can understand better and advice on it.

Thnx
_________________
IBM Certified System Administrator- WebSphere Application Server, Network Deployment, V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
Back to top
View user's profile Send private message
MQWays
PostPosted: Tue Apr 29, 2008 9:48 pm    Post subject: Reply with quote

Acolyte

Joined: 20 Jan 2008
Posts: 61

My main requirement is to use the mirrorq utility to facilitate maintaining a copy of the posted message on separate queue. However to avoid regular maintenance of the queue, I prefer setting up the MAXDEPTH lets say to 3000 and then let it roll-over in circular fashion.

So at any point in time, I would be able to retrieve last 3000 messages for any required investigation, retrieve a copy of any lost message in transit or keep it as proof of a successful MQ Post to the infrastructure guys.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 30, 2008 12:41 am    Post subject: Reply with quote

Grand High Poobah

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

MQWays wrote:
So at any point in time, I would be able to retrieve last 3000 messages for any required investigation, retrieve a copy of any lost message in transit or keep it as proof of a successful MQ Post to the infrastructure guys.


This has been discussed a few times in here. To sumarise the main points:

- WMQ is a bad place to store data. If you need to keep messages, insert them into a database (which is easier to clear out based on message age)
- Auditing should be performed in the application layer. Successful get or put should be recorded by the application in a log
- Properly configured & monitored WMQ installations do not lose messages in transit, despite about 80% of project managers believing they do. The resources used for this kind of "just in case" message logging are better spent on perfecting the configuration & proper monitoring.

A search will turn up many discussions expanding these points.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 30, 2008 1:06 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Using expiry on messages would achieve much the same effect.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Apr 30, 2008 7:02 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

...assuming a very consistent input rate of new messages to maintain ~ 3000 messages.
_________________
Peter Potkay
Keep Calm and MQ On
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 » Circular 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.