Rafael Schloming wrote:
Robert Godfrey wrote:
2
Yep - I have no concerns about that - thanks!
Now... as to having to use a -D on the JVM to choose which URL
format to
use... :-)
-- Rob
are you planning to create more work for me ? :)
We could certainly dynamically figure out which format to use.
Now the question is are we planning to allow both old and new formats
to be used side by side?
Or do we need to make this a configurable policy?
Perhaps that could be done using a -D option?
Something like -Dqpid.dest.format = {URL,Address,Both}
I am happy with either 'Address' or 'Both' being the default .
What do you think?
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
My view is just that we should try to keep things off the command-line
/ -D
parameters as it makes things harder to use... plus there is no reason
why
you might not be mixing old style and new style URLs in the same JVM
(especially if you're running in a container or something like that).
If we can make the syntax unambiguous so that the code can identify which
format it is looking at I think that would be best...
I don't think it's possible to make the syntax unambiguous as you can
have pretty much arbitrary characters in queue names. As I mentioned
before we could have some sort of meta-syntax, e.g. "OLD:..." and
"NEW:..." and we could have a default for addresses that don't start
with "OLD:" or "NEW:", but I don't think there is an easy way to just
look at an unadorned address and figure out which syntax it follows, and
even if this were possible, I think it could possibly be confusing since
you might have very similar looking addresses in both formats, but with
different semantics.
I think this will probably benefit from having the formal grammar for
the new syntax posted, but unfortunately I probably won't get around to
that until sometime well after turkey.
It's after turkey, and as promised I've attached a formal grammar and a
brief description of the semantics for addresses.
--Rafael
Tokens:
LBRACE: r"\{"
RBRACE: r"\}"
COLON: r":"
SEMI: r";"
SLASH: r"/"
COMMA: r","
NUMBER: r'[+-]?[0-9]*\.?[0-9]+'
ID: r'[a-zA-Z_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?'
STRING: r""""(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'"""
ESC:
r"\\[^ux]|\\x[0-9a-fA-F][0-9a-fA-F]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
SYM: r"[....@$^!+-]"
WSPACE: r"[ \n\r\t]+"
EOF:
Grammar:
address = name [ "/" subject ] [ ";" options ]
name = ( part | quoted )+
subject = ( part | quoted | "/" )*
quoted = STRING / ESC
part = LBRACE / RBRACE / COLON / COMMA / NUMBER / ID / SYM
options = map
map = "{" ( keyval ( "," keyval )* )? "}"
keyval = ID ":" value
value = NUMBER / STRING / ID / map / list
list = "[" ( value ( "," value )* )? "]"
Semantics:
An address identifies a source or target for messages. In its
simplest form this is just a name. In general a target address may
also be used as a source address, however not all source addresses
may be used as a target, e.g. a source might additionally have some
filtering criteria that would not be present in a target.
A subject may optionally be specified along with the name. When an
address is used as a target, any subject specified in the address is
used as the default subject of outgoing messages for that target.
When an address is used as a source, any subject specified in the
address is pattern matched against the subject of available messages
as a filter for incoming messages from that source.
The options map contains additional information about the address
including:
- policies for automatically creating, and deleting the node to
which an address refers
- policies for asserting facts about the node to which an address
refers
- extension points that can be used for sender/receiver
configuration
Mapping to 0-10 semantics:
The name is resolved to either an exchange or a queue by querying
the broker.
The subject is set as a property on the message. Additionally, if
the name refers to an exchange, the routing key is set to the
subject.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org