jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: (JMS_SPEC-51) Change Session.createDurableSubscriber() to return a MessageConsumer

From: Ruediger zu Dohna <ruediger.dohna_at_1und1.de>
Date: Thu, 22 Sep 2011 16:19:52 +0200

On 21.09.2011 12:09, Nigel Deakin wrote:
> On 20/09/2011 15:33, Ruediger zu Dohna wrote:
>> +1 for createDurableConsumer, but I'd also suggest to change the first
>> parameter from Topic to Destination... or we'd
>> still have a dependency.
>
> We're not removing the Topic and Queue interfaces - or the distinction
> between topics and queues in general. You can't create a durable
> consumer on a queue, so the first argument still needs to be a Topic.
>
> In the same way, you can't create a QueueBrowser on a topic, so we still
> need Session.createBrowser(Queue queue).

I understand that the concepts of p2p and pub/sub still must exist for
durable subscribers (to Topics) and browsers (in Queues). If that's the
only reason to keep those interfaces, I'd vote to define the methods to
take a Destination and have Topic, Queue, etc. deprecated and eventually
removed. Their methods (getQueue/TopicName and delete for the Temporary
subtypes) should be moved into the Destination (getDestinationName or
getName?). And maybe the delete method should be moved into a new
TemporaryDestination?

But maybe this is a separate issue?