You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Nereus Chen <ne...@gmail.com> on 2011/03/28 12:54:10 UTC

Re: Acknowledge messages

HI,Amit

        try to use the AUTO_ACKNOWLEDGE.
        such as :
        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

2011/3/28 amit_csus [via ActiveMQ] <
ml-node+3411289-406426425-224997@n4.nabble.com>

> Hi,
>
> I am using ActiveMQ 5.4.2.
>
> Can i acknowledge individual message and not tie it to a sessions?
>
> So is what i am trying out, I create a message consumer (async) and it is
> having a Executor service to process the messages it receives in multiple
> executor threads. Now each message is given to a single executor thread. I
> want that executor to independently acknowledge the message without
> affecting other executor threads messages.
>
> Let me know is there a way out?
>
> Thanks,
> Amit
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Acknowledge-messages-tp3411289p3411289.html
>  To start a new topic under ActiveMQ - User, email
> ml-node+2341805-711425220-224997@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=bmVyZXVzLmNoZW5AZ21haWwuY29tfDIzNDE4MDV8LTkzMTQ3MTE3Nw==>.
>
>


--
View this message in context: http://activemq.2283324.n4.nabble.com/Acknowledge-messages-tp3411289p3411302.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Acknowledge messages

Posted by Nereus Chen <ne...@gmail.com>.
Ok.I know.

you want to consumer a message and process it in a transaction to ignore
lose the message when occurs exceptions during the process.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Acknowledge-messages-tp3411289p3411356.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Acknowledge messages

Posted by Nereus Chen <ne...@gmail.com>.
I suggest you to use a session independently in every thread which is
contained  by a excutor.

and cannot share the session by multi threads.

In the thread  you can use the consumer.receive()  method  rather then the
linstener's  onMessage().



--
View this message in context: http://activemq.2283324.n4.nabble.com/Acknowledge-messages-tp3411289p3411383.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.