Right. A GET request to the QUEUE service allows you to specify the
message types that you want to include. There's not a way to specify
message types that you want to exclude (e.g. that you don't want to get
off the queue)..
Note that in general, you should know the message types that you want to
get off the queue so that you don't have to submit a QUEUE PEEK request
first.
Now to answer your question. If you are submitting the QUEUE GET/PEEK
request using the STAF.exe command (e.g. via the command line or a shell
script), you should know that it displays "<None>" for any values that are
blank (e.g. have length 0) when displaying a marshalled result in verbose
mode. So, to get or peek messages whose TYPE is "" (because no type was
assigned when the message was queued), you can specify TYPE :0: (this is
STAF's length delimited format that is of the form :<Length>:<String>) to
indicate a value with no length since the STAF request parser doesn't
understand TYPE "". For example:
STAF local QUEUE GET TYPE :0: ALL
See section "Option Value Formats" in the STAF User's Guide at
http://staf.sourceforge.net/current/STAFUG.htm#HDROVFORM for more
information. This section says:
Also, note that when you want to specify an empty string for the value of
an option, you must use the third format (the length delimited format)
because if you specify no value or "", then the STAF command parser thinks
that no value was specified for the option and this will cause an "Invalid
Request String" error (RC 7) if the option requires a value. For example,
MESSAGE :0:
Or, if you are submitting the QUEUE GET/PEEK request via a program (e.g.
Java, C++, Python, Perl, Tcl), you can use one of the "wrapData" functions
that STAF provides to generate STAF's length delimited format in the form
of :<Length>:<String>.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Erik Mägi <erik.ma...@gmail.com>
To: staf-users@lists.sourceforge.net,
Date: 03/05/2013 12:49 PM
Subject: [staf-users] Excluding messages when retrieving messages
from queue
Hello,
As I understand there is no direct way of excluding message types when
retrieving messages from a queue. I am able to mimic the exclude procedure
by simply doing a PEEK first and creating a list of desirable message
types and then doing something like GET ALL TYPE A TYPE B... etc.
However, this will not get messages that have no type (<None>). Is there a
special type for <None> or is it stored under some STAF variable that I
could use to also include typeless messages in my query?
Regards,
Erik
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users