Hi Nigel,
I definitely agree with putting this in the spec. I must admit I have
always assumed that multiple consumers are supported (they work with all
the JMS providers I have worked with), and it didn't even occur to me
that they might not be. The obvious use case would be as a way to
distribute work across different threads or processes.
Chris
On 2/19/2013 8:48 AM, Nigel Deakin wrote:
> Whilst reviewing the draft spec I came across this issue. Although I
> hope this s simply a recognition of current practice it represents a
> spec change and so is worth highlighting more formally and asking for
> views.
>
> If possible I'd like to include this in JMS 2.0.
>
> -------- Original Message --------
> http://java.net/jira/browse/JMS_SPEC-115
> Remove the statement that portable applications should only have one
> consumer per queue
>
> The JMS 1.1 specification, in section 4.4.9 "Multiple Sessions" states
> that
>
> For PTP, JMS does not specify the semantics of concurrent
> QueueReceivers for
> the same Queue; however, JMS does not prohibit a provider from supporting
> this. Therefore, message delivery to multiple QueueReceivers will
> depend on the
> JMS provider's implementation. Applications that depend on delivery to
> multiple QueueReceivers are not portable
>
> This means that a JMS provider is not required to support multiple
> consumers on the same queue, and that although JMS providers are
> allowed to do so, any application which depends on this is not portable.
>
> I think that statement is obsolete now that all modern JMS providers
> allow multiple consumers on a queue. It is also anomalous now that JMS
> 2.0 requires shared subscriptions to allow multiple consumers.
>
> It is therefore proposed that the section above be reworded to state
> that a queue may have multiple consumers, but that JMS does not define
> how messages from a queue are distributed amongst multiple consumers
> (i.e. there is no requirement for load-balancing etc).
>
>