Solved

JMS

Posted on 2002-03-07
2
383 Views
Last Modified: 2010-03-31
Hi all
I read in java.sun JMS tutorial that I can create a message selectors. Can I use it to select messages that contains/not contains specific words ?
If so How can I do it? (I need to moderate messages that contains specific words)
Code will be useful.
    Thanks Danny
0
Comment
Question by:dannysh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 40 total points
ID: 6852233
According to the JMS Spec (3.8.1), selectors cannot reference message body values. Instead, they allow the consumer to specify which messages it is interested in based on headers and properties of the message. The header is a set of predefined fields needed primarily for routing and delivery. The properties are application defined but are separate from the body of the message itself. If you could be guaranteed that the producer of the message would reliably put the correct properties in the message so that your filtering would work, then you could use a selector in your message consumer. Note that the selector doesn't prevent a producer from placing a message on a queue. It simply prevents the consumer from seeing it. The following link, although some of it is Oracle specific, contains some example code for using a selector
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88890/adq12jap4.htm

The JMS Specification itself contains a detailed explanation of the syntax for a selector. It is SQL-ish in nature so if you understand a SQL where clause you are well on your way to understanding the JMS selector syntax.

Best regards,
Jim Cakalic
0
 

Author Comment

by:dannysh
ID: 6855794
Thanks Jim.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spring jars download 1 53
Java string replace 11 62
jboss 7.1 start up error 1 63
Problem to Alipay 10 70
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question