users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: (JMS_SPEC-94) Define what characters are valid in a durable (or shared subscription) name

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Wed, 14 Nov 2012 14:30:48 +0000

Thanks for the comments. I think we should keep this list as small as possible, but I am now proposing that we require
support for

* Java letters
* Java digits
* Underscore (_)
* Full stop/period (.)
* Minus/hyphen (-)

Note that this does not prevent JMS providers from supporting additional characters. This would be just defining a set
that is guaranteed to be supported.

Remember this is to allow a RA or an EJB container to generate subscription names automatically. It would also be useful
if JMS specified that a JMS provider must support subscription names up to a specified length. We could then specify
that any subscription name generated by a RA or EJB container must be shorter than this.

The choice of a length is somewhat arbitrary, but how about requiring that a JMS provider must be able to handle
subscription names of up to 128 characters? (It needs to be long enough to allow reasonably meaningful names to be
generated from application name, MDB name, cluster name etc combined with some kind of hash to ensure that they are
unique).

Again this would not prevent JMS providers from supporting names longer than this. This is just defining a length which
is guaranteed to be supported.

Nigel

On 13/11/2012 07:12, Rüdiger zu Dohna wrote:
> Nigel,
>
> I think it would be useful to allow the minus character "-" just as well... it's another commonly used character for
> identifiers.... and be it only for UUIDs.
>
>
> Rüdiger
>
> On 12.11.2012, at 18:19, Nicholas Wright<nwright_at_c2b2.co.uk> wrote:
>
>> Sorry Nigel, to clarify yes I do see people using '.' in subscriber names, for 2 main reasons:
>>
>> - they sometimes like to use IPs or hostnames in the subscriber names - they like to match subscriber names to
>> destination names (which typically include '.')
>>
>> I'm not overly committed to this being in the spec, just thought it might be nice.
>>
>> Nick
>>
>>
>> Nicholas Wright Senior Consultant C2B2 Consulting Ltd The Leading Independent Middleware Experts W: www.c2b2.co.uk
>> | T: (+44) 8450 539457 | M: (+44) 7703 193351 | @c2b2consulting
>> ---------------------------------------------------------------------------------------------------------------
>> C2B2 Consulting Limited, Unit 34, Malvern Hills Science Park, Geraldine Road, Malvern, Worcestershire, WR14 3SZ
>> Registered in England and Wales: 4563419, Registered Office: Ardendale, Old Hollow, Malvern, Worcestershire
>>
>> On 12/11/2012 16:51, Nigel Deakin wrote:
>>> Nick,
>>>
>>> On 12/11/2012 16:09, Nicholas Wright wrote:
>>>> On 12/11/2012 15:48, Nigel Deakin wrote:
>>>>> I would therefore like to suggest that we specify that the following characters must always be valid in a
>>>>> durable or non-durable subscription name:
>>>>>
>>>>> * Java letter or digit (as defined in Character.isLetterOrDigit)
>>>>>
>>>>> * Underscore (_, or \u005f)
>>>>
>>>> This looks like standard practice to me. Many people also use '.' in their naming strategy. Given that this is
>>>> a convention I see being used widely can we include this also please.
>>>>
>>>> The choice of only underscores or alphanumerics would not break the Apache ActiveMQ implementation to my
>>>> knowledge (Rob is likely better placed to act as the authority on this). They have a wildcarding mechanism for
>>>> subscription to destinations which takes things like '*', this code will need to be checked. But this is a
>>>> value add feature outside of the spec.
>>>
>>> I know some JMS providers make use of "." and "*" in destination names for wildcarding. But I'm only concerned
>>> with subscription names here. Do your comments apply to subscription names as well?
>>>
>>> Nigel
>>
>