You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "jacky.wang" <65...@qq.com> on 2016/08/09 06:45:33 UTC

Ack,Redelivery,sessionTransacted--- Consumer Slowly!!!

hi all.
Rqurement Case:
Consumer consumed message until logic method called successful.
Flow Chart:1.Producer send message - > 2.MessageListner - onMessage() ->
3.call  logic method successfully -> 4.then Ack() -> 5.message consumed or
dequeued

DefaultMessageListener Container config:
<bean id="jmsContainer"
		class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="destination" ref="feedsQueueDestination" />
		<property name="messageListener" ref="consumerMessageListener" />
		
		<property name="sessionTransacted" value="true" />
</bean>

sessionTransacted must set the value true. if not Redelivery Invalid。
So there is a problem here :
All Messages Dequeued until previous message redilivery completed. so my
consumer is slowly.

Best Regards.








--
View this message in context: http://activemq.2283324.n4.nabble.com/Ack-Redelivery-sessionTransacted-Consumer-Slowly-tp4715220.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ack,Redelivery,sessionTransacted--- Consumer Slowly!!!

Posted by Tim Bain <tb...@alumni.duke.edu>.
I'm still not clear what question you're asking.  I sympathize with you for
having to ask questions in a language that's not your native one, and I'm
happy to work through the language challenges, but I'll probably need you
to use more words (a lot more words) to describe your question.  If you
over-explain the question, then even if something's not quite clear because
you're having to ask in English, at least we should be able to figure it
out based on everything else.  (That is, if you describe the same thing two
or three different ways, odds are we'll understand at least one of them and
be able to help.)

Based on what you've said so far, I think that:

   1. You're using transactions.
   2. You seem to be asking about what happens in the case where messages
   can't be consumed and the transaction is rolled back, causing messages to
   be redelivered.
   3. You might be getting behavior you don't expect regarding the order in
   which messages are consumed when a redelivery happens.  It sounds like
   you're maybe wanting everything to pause while the redelivery is attempted,
   and instead the later messages are being processed before the redelivered
   one; or maybe it's the opposite, and you're unhappy because you have to
   wait for the redelivered message to be consumed before anything else gets
   consumed.  I'm not sure if either of these possibilities is actually what
   you're saying/asking.

What else can you tell us about the question you're asking?

Tim

On Tue, Aug 9, 2016 at 7:51 PM, jacky.wang <65...@qq.com> wrote:

> I'm so sorry for my pool english!~
>
> ->sessionTransacted must set the value true. if not Redelivery Invalid .
>
> ->sessionTransacted properties value must be set to true otherwise
> Redelivery will fail!
>
> ->All Messages Dequeued until previous message redilivery completed.
>
> ->MessageListener receive or consume message must wait unitl the privious
> message(redelivery) process completed.
>
> Question :
> MessageListner normal recieving message ignore program blocking。
>
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Ack-Redelivery-sessionTransacted-Consumer-
> Slowly-tp4715220p4715289.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Ack,Redelivery,sessionTransacted--- Consumer Slowly!!!

Posted by "jacky.wang" <65...@qq.com>.
I'm so sorry for my pool english!~

->sessionTransacted must set the value true. if not Redelivery Invalid .

->sessionTransacted properties value must be set to true otherwise
Redelivery will fail!

->All Messages Dequeued until previous message redilivery completed.

->MessageListener receive or consume message must wait unitl the privious
message(redelivery) process completed.

Question :
MessageListner normal recieving message ignore program blocking。








--
View this message in context: http://activemq.2283324.n4.nabble.com/Ack-Redelivery-sessionTransacted-Consumer-Slowly-tp4715220p4715289.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Ack,Redelivery,sessionTransacted--- Consumer Slowly!!!

Posted by Tim Bain <tb...@alumni.duke.edu>.
I'm sorry, but I have no idea what question you're asking.  Could you
explain in more detail?

A few things to start with:

   - What do you mean by "So there is a problem here :"?
   - What do you mean by "sessionTransacted must set the value true. if not
   Redelivery Invalid"?
   - What do you mean by "All Messages Dequeued until previous message
   redilivery completed."?

Tim

On Tue, Aug 9, 2016 at 12:45 AM, jacky.wang <65...@qq.com> wrote:

> hi all.
> Rqurement Case:
> Consumer consumed message until logic method called successful.
> Flow Chart:1.Producer send message - > 2.MessageListner - onMessage() ->
> 3.call  logic method successfully -> 4.then Ack() -> 5.message consumed or
> dequeued
>
> DefaultMessageListener Container config:
> <bean id="jmsContainer"
>                 class="org.springframework.jms.listener.
> DefaultMessageListenerContainer">
>                 <property name="connectionFactory" ref="connectionFactory"
> />
>                 <property name="destination" ref="feedsQueueDestination" />
>                 <property name="messageListener"
> ref="consumerMessageListener" />
>
>                 <property name="sessionTransacted" value="true" />
> </bean>
>
> sessionTransacted must set the value true. if not Redelivery Invalid。
> So there is a problem here :
> All Messages Dequeued until previous message redilivery completed. so my
> consumer is slowly.
>
> Best Regards.
>
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Ack-Redelivery-sessionTransacted-Consumer-Slowly-tp4715220.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>