Wildcards in Topics,Queues and multicast
Wildcards in Topics
Ø You can subscribe to
wildcard topics.
§ If you subscribe to a
topic containing a wildcard, you will receive any message published to a
matching topic
Ø You cannot publish to
wildcard topics
§ If foo.bar is not in
the configuration file, then you can publish to foo.bar if foo.* or foo.>
exists in the configuration file.
Wildcards in Queues
Ø You can neither send to
nor receive from wildcard queue names. However, you can use wildcard queue
names in the configuration files.
§ For example, if the
queue configuration file includes a line: foo.* then users can dynamically
create queues foo.bar, foo.bob, and so forth, but not foo.bar.bob.
Wildcards and Multicast
Ø Messages published to
multicast-enabled topics are sent on the multicast channels defined for those
topics. A wildcard may cover multiple multicast-enabled topics, each on a
different multicast channel.
Wildcards and
Dynamically Created Destinations
Ø The EMS server may
dynamically create destinations on behalf of its clients. The use of wildcards
in the .conf files can be used to control the allowable names of dynamically
created destinations.
Ø The same basic wildcard
rules apply to dynamically created destinations as described above for static
destinations
• If the queues.conf file contains: >
The EMS
server can dynamically create a queue with any name.
• If the topics.conf file contains only: foo.>
The EMS
server can dynamically create topics with names like foo.bar,
foo.boo,
foo.boo.bar, and foo.bar.boo.
• If the queues.conf file contains only: foo.*
The EMS server can
dynamically create queues with names like foo.bar and foo.boo, but not foo.bar.boo.
Inheritance
Ø All destination
properties are inheritable for both topics and queues. This means that a
property set for a "wildcarded" destination is inherited by all
destinations with matching names.
§ For example, if you
have the following in your topics.conf file: foo.* secure then Topics foo.bar
and foo.bob are secure topics because they inherit secure from their parent, foo.*.
If your EMS server were to dynamically create a foo.new topic, it too would
have the secure property.
Ø The properties
inherited from a parent are in addition to the properties defined for the child
destination.
§ For example, if you
have the following in your topics.conf
file:foo.* secure
foo.bar sender_name
§ Then foo.bar has both
the secure and sender_name properties.
Ø Properties that are
assigned values, you can override the value established in a parent.
§ For example, if you
have the following in your queues.conf
·
foo.* maxbytes=200
·
foo.bar maxbytes=2000
§ The foo.bar queue has a
maxbytes value of 2000.
Ø When there are multiple
ancestors for a destination, the destination inherits theproperties from all of
the parents.
§ For example:
·
> sender_name
·
foo.* secure
·
foo.bar trace
§ The foo.bar topic has
the sender_name, secure and trace properties.
Ø When there are multiple
parents for a destination that contain conflicting property values, the
destination inherits the smallest value.
§ For example:
·
> maxbytes=2000
·
foo.* maxbytes=200
·
foo.bar
§ The foo.bar topic has a
maxbytes value of 200.
Comments
Post a Comment