Ce contenu n'est pas disponible dans la langue sélectionnée.

20.11.2. Selector filter


<type name="selector-filter" class="restricted" source="string" provides="filter">
    <descriptor name="apache.org:selector-filter:string" code="0x0000468C:0x00000004"/>
</type>
Copy to Clipboard Toggle word wrap
The qpid-java JMS "selector" defines an SQL like syntax for filtering messages. The selector filters based on the values of "headers" and "properties". The selector-filter uses the selector as defined by JMS but with the names of JMS headers translated into their AMQP equivalents. The defined JMS headers can be mapped to equivalent fields within the AMQP message sections:
The full list of headers is included in Section 20.6, “Java JMS Message Properties”.
When encoding the selector string on the wire, these JMS header names should be translated to amqp.field_name where field_name is the appropriate AMQP 1.0 field named in the table above, with the hyphen replaced by an underscore. For example, the selector: JMSCorrelationID = 'abc' AND color = 'blue' AND weight > 2500 would be transferred over the wire as: amqp.correlation_id = 'abc' AND color = 'blue' AND weight > 2500
The "properties" of the JMS message are equivalent to the AMQP application-properties section. Thus a reference to a property Foo in a message selector would be evaluated as the value associated with the key "Foo" (if present) in the application-properties section.
The operands of the JMS selector are defined in terms of the types available within JMS, When evaluated against the application properties section, the values within that section are evaluated according to the following type mapping:
Expand
Table 20.15. Mapping AMQP types to JMS types
AMQP Type JMS Selector Type
null
null
boolean
boolean
ubyte
short
ushort
int
uint
long
ulong
long
byte
byte
short
short
int
int
long
long
float
float
double
double
decimal32
double
decimal64
double
decimal128
double
char
char
timestamp
long
uuid
byte[16]
binary
byte[]
string
String
symbol
String
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat