Re: two possible issues when integrating with spring-jms

2016-09-21 Thread Tim Bain
For your first question, if that happens, you'll get an overflow
exception.  Of course, Long.MAX_VALUE is 9223372036854775807, so you're
worrying about a non-issue.

For your second question, can you please clarify exactly what you're
asking?  Also, depending on what the question is, you may have better luck
asking it of the Spring developers, since the method you referenced is
their code and not ours.

On Sep 21, 2016 7:36 AM, "ted_dong" <492399...@qq.com> wrote:

> First Question:
> Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue,
> Message)
> is trying to create a TemporaryQueue then delete it. However, for each
> TemporaryQueue, connection will use LongSequenceGenerator to generate a
> incrementing queue name, what if sequence id grow bigger than
> Long.MAX_VALUE.
>
> Second Question:
> Again, for doExecuteRequest, if two thread is calling this method. For
> instance, thread A send a request to queue Q first, thread B send to queue
> Q
> later, but response for request B arrives first and response A later. Then
> thread A takes response of thread B.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/two-possible-issues-when-integrating-with-
> spring-jms-tp4716687.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: two possible issues when integrating with spring-jms

2016-09-21 Thread Christopher Shannon
To answer your first question, growing larger than Long.MAX_VALUE is
practically impossible. The value is 9,223,372,036,854,775,807.  Even if
you were to create 1 temporary queue every millisecond it would take over
292 million years to reach Long.MAX_VALUE

For your second question, there is no issue because each request would have
its own unique temporary queue for a response so they don't interfere.
When you use a temporary queue the message contains name of the unique
reply to destination.  So when you send a message to queue Q and it is
processed, the receive of the message can check to the JMSReplyTo property
to know where to send the response to.  This means that the order it is
processed doesn't really matter and shouldn't interfere.

On Wed, Sep 21, 2016 at 8:07 AM, ted_dong <492399...@qq.com> wrote:

> First Question:
> Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue,
> Message)
> is trying to create a TemporaryQueue then delete it. However, for each
> TemporaryQueue, connection will use LongSequenceGenerator to generate a
> incrementing queue name, what if sequence id grow bigger than
> Long.MAX_VALUE.
>
> Second Question:
> Again, for doExecuteRequest, if two thread is calling this method. For
> instance, thread A send a request to queue Q first, thread B send to queue
> Q
> later, but response for request B arrives first and response A later. Then
> thread A takes response of thread B.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/two-possible-issues-when-integrating-with-
> spring-jms-tp4716687.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


two possible issues when integrating with spring-jms

2016-09-21 Thread ted_dong
First Question:
Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue, Message)
is trying to create a TemporaryQueue then delete it. However, for each
TemporaryQueue, connection will use LongSequenceGenerator to generate a
incrementing queue name, what if sequence id grow bigger than
Long.MAX_VALUE.

Second Question:
Again, for doExecuteRequest, if two thread is calling this method. For
instance, thread A send a request to queue Q first, thread B send to queue Q
later, but response for request B arrives first and response A later. Then
thread A takes response of thread B.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/two-possible-issues-when-integrating-with-spring-jms-tp4716687.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.