Im sorry, muy bad. I followed the code in ProtocolConverter.java, it
uses a hashmap to store the destinations for a given consumer id, so
you can subscribe to multiple destination by send multiple SUBSCRIBE
frames for the same consumer id. Good luck.
- Sandeep
On Apr 18, 2008, at 11:42 AM, Sandeep Chayapathi wrote:
> Hi John,
>
> The stomp spec doesn't say if you can subscribe to more than one
> destination:
>
> ----
>
http://stomp.codehaus.org/Protocol:>
> The SUBSCRIBE command is used to register to listen to a given
> destination. Like the SEND command, the SUBSCRIBE command requires a
> destination header indicating which destination to subscribe to.
> ----
>
> However the stomp transport implementation in activemq (look at
> org.apache.activemq.transport.stomp.ProtocolConverter class) doesn't
> allow more than one destination.
>
> If you need to subscribe to more than one destination, take a look @
> composite destinations. Hope that helps.
>
> - Sandeep
>
> On Apr 18, 2008, at 10:24 AM, andrewk wrote:
>
>>
>> it's implicit in the spec for the protocol if you look at the
>> subscribe
>> message - why else have this message if you can only subscribe to one
>> destination?
>>
>> I suspect the more you use stomp, the more stuff like this should
>> become
>> clear.
>> Good luck,
>>
>> -Andrew
>>
>>
>> delphi329 wrote:
>>>
>>> oh, thanks. I didn't even know that you can subscribe to multiple
>>> destination. I am using php and the lack of threading in php
>>> means I need
>>> to subscribe to multiple destinations.
>>>
>>> Where did you find that stomp allow multiple subscription? The
>>> only info
>>> I can find on stomp is on codehause.
>>>
>>> thanks,
>>>
>>> -john
>>>
>>>
>>> andrewk wrote:
>>>>
>>>> In stomp, you can subscribe to as many destinations as you want
>>>> for your
>>>> connection, simply send another subscribe message.
>>>> Am I missing something?
>>>>
>>>> -Andrew Kuklewicz
>>>>
>>>>
>>>> delphi329 wrote:
>>>>>
>>>>> Hi:
>>>>>
>>>>> How do I subscribe to multiple queues? E.g. have two queues,
>>>>> /queue/a/b/c and /queue/a/b/d and I want to listen to both of
>>>>> them? Can
>>>>> I use selector on destination header?
>>>>>
>>>>> thanks,
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
http://www.nabble.com/listen-on-multiple-queues-tp16757919p16763448.html>> Sent from the stomp - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>
http://xircles.codehaus.org/manage_email>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email