You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cafe <rm...@estudiantes.uci.cu> on 2007/01/26 06:50:19 UTC
Suggestion on how to get a unique id for a queue?
Hello:
In my app I employ activeMQ + Spring…and it consist in many client who
communicate with a server who respond with different message for different
client through many queue, this queues are created in the client side..
Now I need an automatic way to obtain a unique name for each queue in deploy
time rather than manually putting the name in a file or wherever.
--
View this message in context: http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8646415
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Suggestion on how to get a unique id for a queue?
Posted by James Strachan <ja...@gmail.com>.
On 1/26/07, cafe <rm...@estudiantes.uci.cu> wrote:
>
> no, I can't because the client request to the server inside a MessageListener
> and when the method onMessage end the execution the temporary queue is
> destroyed.
Not quite. A temporary destination is only destroyed when the
connection which created it is closed (or the client explicitly
destroys it).
So create however many temporary destinations you require on start up,
then create a consumer & MessageListener and use them as often as you
require. No need to create your own UUIDs and stuff
Also this FAQ entry might help...
http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html
--
James
-------
http://radio.weblogs.com/0112098/
Re: Suggestion on how to get a unique id for a queue?
Posted by cafe <rm...@estudiantes.uci.cu>.
thank Christopher, that is a better idea...
Christopher G. Stach II wrote:
>
> cafe wrote:
>> no, I can't because the client request to the server inside a
>> MessageListener
>> and when the method onMessage end the execution the temporary queue is
>> destroyed.
>
> Use a permanent queue and a message selector on a JMS header with a UUID
> in it?
>
> --
> Christopher G. Stach II
>
>
>
--
View this message in context: http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8660269
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Suggestion on how to get a unique id for a queue?
Posted by "Christopher G. Stach II" <cg...@ldsys.net>.
cafe wrote:
> no, I can't because the client request to the server inside a MessageListener
> and when the method onMessage end the execution the temporary queue is
> destroyed.
Use a permanent queue and a message selector on a JMS header with a UUID
in it?
--
Christopher G. Stach II
Re: Suggestion on how to get a unique id for a queue?
Posted by cafe <rm...@estudiantes.uci.cu>.
no, I can't because the client request to the server inside a MessageListener
and when the method onMessage end the execution the temporary queue is
destroyed.
rajdavies wrote:
>
> you could use temporary queues (which will be unique) ??
>
> On 26 Jan 2007, at 05:50, cafe wrote:
>
>>
>> Hello:
>> In my app I employ activeMQ + Spring…and it consist in many client who
>> communicate with a server who respond with different message for
>> different
>> client through many queue, this queues are created in the client
>> side..
>>
>> Now I need an automatic way to obtain a unique name for each queue
>> in deploy
>> time rather than manually putting the name in a file or wherever.
>>
>> --
>> View this message in context: http://www.nabble.com/Suggestion-on-
>> how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8646415
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>
>
--
View this message in context: http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8656421
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Suggestion on how to get a unique id for a queue?
Posted by Rob Davies <ra...@gmail.com>.
you could use temporary queues (which will be unique) ??
On 26 Jan 2007, at 05:50, cafe wrote:
>
> Hello:
> In my app I employ activeMQ + Spring…and it consist in many client who
> communicate with a server who respond with different message for
> different
> client through many queue, this queues are created in the client
> side..
>
> Now I need an automatic way to obtain a unique name for each queue
> in deploy
> time rather than manually putting the name in a file or wherever.
>
> --
> View this message in context: http://www.nabble.com/Suggestion-on-
> how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8646415
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Re: Suggestion on how to get a unique id for a queue?
Posted by cafe <rm...@estudiantes.uci.cu>.
thanks I'll see that
tony.x.rippy wrote:
>
> The Jakarta Commons Id project may be what you're looking for.
> (http://jakarta.apache.org/commons/sandbox/id/) You can use the UUID
> generators to create names that are unique across multiple producers.
>
> - Tony
>
>
>
>
> cafe <rm...@estudiantes.uci.cu>
> 01/26/2007 12:50 AM
> Please respond to
> activemq-users@geronimo.apache.org
>
>
> To
> activemq-users@geronimo.apache.org
> cc
>
> Subject
> Suggestion on how to get a unique id for a queue?
>
>
>
>
>
>
>
> Hello:
> In my app I employ activeMQ + Spring…and it consist in many client who
> communicate with a server who respond with different message for different
> client through many queue, this queues are created in the client side..
>
> Now I need an automatic way to obtain a unique name for each queue in
> deploy
> time rather than manually putting the name in a file or wherever.
>
> --
> View this message in context:
> http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8646415
>
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
>
>
> -----------------------------------------
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure
> under applicable law. If you are not the intended recipient, you
> are hereby notified that any disclosure, copying, distribution, or
> use of the information contained herein (including any reliance
> thereon) is STRICTLY PROHIBITED. Although this transmission and
> any attachments are believed to be free of any virus or other
> defect that might affect any computer system into which it is
> received and opened, it is the responsibility of the recipient to
> ensure that it is virus free and no responsibility is accepted by
> JPMorgan Chase & Co., its subsidiaries and affiliates, as
> applicable, for any loss or damage arising in any way from its use.
> If you received this transmission in error, please immediately
> contact the sender and destroy the material in its entirety,
> whether in electronic or hard copy format. Thank you.
>
>
--
View this message in context: http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8656435
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Suggestion on how to get a unique id for a queue?
Posted by to...@jpmchase.com.
The Jakarta Commons Id project may be what you're looking for.
(http://jakarta.apache.org/commons/sandbox/id/) You can use the UUID
generators to create names that are unique across multiple producers.
- Tony
cafe <rm...@estudiantes.uci.cu>
01/26/2007 12:50 AM
Please respond to
activemq-users@geronimo.apache.org
To
activemq-users@geronimo.apache.org
cc
Subject
Suggestion on how to get a unique id for a queue?
Hello:
In my app I employ activeMQ + Spring…and it consist in many client who
communicate with a server who respond with different message for different
client through many queue, this queues are created in the client side..
Now I need an automatic way to obtain a unique name for each queue in
deploy
time rather than manually putting the name in a file or wherever.
--
View this message in context:
http://www.nabble.com/Suggestion-on-how-to-get-a-unique-id-for-a-queue--tf3120851.html#a8646415
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.