Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA5211054C for ; Mon, 3 Mar 2014 09:48:18 +0000 (UTC) Received: (qmail 86067 invoked by uid 500); 3 Mar 2014 09:48:18 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 85508 invoked by uid 500); 3 Mar 2014 09:48:16 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 85499 invoked by uid 99); 3 Mar 2014 09:48:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 09:48:15 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rajdavies@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 09:48:10 +0000 Received: by mail-we0-f176.google.com with SMTP id x48so2823675wes.21 for ; Mon, 03 Mar 2014 01:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=dyu7SBX5i0Hp27rQ/uLAhQ5m+jIOyyA5DfrURlFt8NE=; b=CeTsfyGfrS+7JSXC7aF/Q4sO5HWB7fQCr8Lbh4NH7zVGbtprgMeJ9W9b2ztgfmFzUc kbZwm2vMNei5qHggslFCP7bT/Cgq+c/DebaOZ8Mz3Aclc+/h1CvYjAK8+ZmFXercFIah kHMxJZy7raenvLGtj2smsseLE6A4R8u/eucPd+q0cOu26Qjdc26bUp7E3zC2BG0OkIBH 1V3IoBNw1EomsPliKgKW2t7UhfTqrWobqxiAX7TnnDuYpWolQXGKzCObrm0r7SliOfI6 HFQqOWjD2oeE8Urzin0Y7ZmT+ZQCqdJR1OVQh2wC+KfpXey23jtE5aIWACk/6GasYO57 a4iA== X-Received: by 10.194.92.38 with SMTP id cj6mr3966517wjb.70.1393840069005; Mon, 03 Mar 2014 01:47:49 -0800 (PST) Received: from [10.6.194.229] (dab-far1-h-19-7.dab.02.net. [82.132.222.173]) by mx.google.com with ESMTPSA id h13sm32534165wjr.22.2014.03.03.01.47.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 01:47:48 -0800 (PST) References: Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <6C4D9010-1D7C-4231-AA8F-3A9E5A87ED7D@gmail.com> Cc: "users@activemq.apache.org" X-Mailer: iPhone Mail (11B651) From: Rob Davies Subject: Re: can a client "refuse" a message? Date: Mon, 3 Mar 2014 09:47:45 +0000 To: "users@activemq.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Beanstalkd might be a better fit for your use case - it's job based - and ii= rc allows the client to reject jobs=20 > On 3 Mar 2014, at 09:41, Li Li wrote: >=20 > thank you. I want to know now is that to achieve my goal(as I > described before), is it suitable to use activemq(or activemq+camel). > if it's very hard to implement with activemq(+camel), I will try other > solutions. or any other solutions are very welcomed. I could use any > related solution(e.g. rabbitmq or other message related system) >=20 >> On Mon, Mar 3, 2014 at 5:14 PM, Noel OConnor wro= te: >> Rather than trying to change activemq you could look at implementing >> something with activemq and camel to provide this custom dispatch and >> redelivery mechanism. >>=20 >> But as artnaseef stated it wouldn't be a simple solution. >>=20 >>=20 >>> On Mon, Mar 3, 2014 at 6:41 PM, Li Li wrote: >>>=20 >>> sorry to hear that. I need this feature very much. is it possible to >>> "extend" activemq to achive this? is it difficult to modify the >>> dispatch logic of activemq? >>>=20 >>>> On Mon, Mar 3, 2014 at 1:56 PM, artnaseef wrote: >>>> JMS does not provide such a method. You could use one queue per consume= r >>> and have a consumer send the message back to an input queueon failure, b= ut >>> it would get complex since a way of knowing which consumers rejected the= >>> message would need to be tracked with the message, as well as knowing al= l >>> the consumers and their queues. >>>>=20 >>>>=20 >>>> Sent from my iPhone >>>>=20 >>>>> On Mar 2, 2014, at 9:36 PM, "Li Li [via ActiveMQ]" < >>> ml-node+s2283324n4678441h19@n4.nabble.com> wrote: >>>>>=20 >>>>> hi all, >>>>> can a queue message consumer "refuse" a message after receive a >>> message? >>>>> because a client don't know the message in advance. >>>>> onMessage(Message msg){ >>>>> if(CannotProcess(msg)){ >>>>> //refuse this message >>>>> } >>>>> } >>>>> what I need is: if the message can't be processed by one client, it >>>>> can be sent to another consumer. >>>>> if all consumer "refuse" this message, then this message will be >>>>> removed to dead letter queue or to the end of the queue. >>>>>=20 >>>>>=20 >>>>> If you reply to this email, your message will be added to the >>> discussion below: >>> http://activemq.2283324.n4.nabble.com/can-a-client-refuse-a-message-tp46= 78441.html >>>>> To start a new topic under ActiveMQ - User, email >>> ml-node+s2283324n2341805h3@n4.nabble.com >>>>> To unsubscribe from ActiveMQ - User, click here. >>>>> NAML >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> View this message in context: >>> http://activemq.2283324.n4.nabble.com/can-a-client-refuse-a-message-tp46= 78441p4678446.html >>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>=20