From dev-return-66170-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Mon Jul 2 18:34:29 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A97EB1807EC for ; Mon, 2 Jul 2018 18:30:18 +0200 (CEST) Received: (qmail 72557 invoked by uid 500); 2 Jul 2018 16:30:17 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 72546 invoked by uid 99); 2 Jul 2018 16:30:17 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2018 16:30:17 +0000 Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 92B0ACED for ; Mon, 2 Jul 2018 16:30:16 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id b15-v6so3303469oib.10 for ; Mon, 02 Jul 2018 09:30:16 -0700 (PDT) X-Gm-Message-State: APt69E1ComRw96qOxKmCNujBoS7ZqnHYKkhrb3Pw8X22KqZBd5g2pUrr yA/oRijwd8Cz7RbJ//VkzI5RIH9846CwyDlkxu6iaw== X-Google-Smtp-Source: AAOMgpe92HAQMLbS0915jTRP7tL9SlnAYK8keJS9B0JDP7yQAmUenA3FQL+Gu/Po7jXv6pbvqV4FRU2hukwBzABmy3I= X-Received: by 2002:aca:f02:: with SMTP id 2-v6mr4543316oip.216.1530549015900; Mon, 02 Jul 2018 09:30:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:6852:0:0:0:0:0 with HTTP; Mon, 2 Jul 2018 09:30:15 -0700 (PDT) In-Reply-To: <1530522455187-0.post@n4.nabble.com> References: <1530522455187-0.post@n4.nabble.com> From: Justin Bertram Date: Mon, 2 Jul 2018 11:30:15 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: ActiveMQ prevent consumer handling specific message To: dev@activemq.apache.org Content-Type: multipart/alternative; boundary="000000000000678440057006b624" --000000000000678440057006b624 Content-Type: text/plain; charset="UTF-8" I provided an answer on your Stack Overflow question [1]. Justin [1] https://stackoverflow.com/questions/51124070/activemq-prevent-consumer-handling-specific-message On Mon, Jul 2, 2018 at 4:07 AM, itaym wrote: > We have a design challenge where the situation is as follow: > > There are multiple producers and multiple consumers (on same queue). > > Each message represent a task with parameters that consumer needs to > handle. > > The problem is that there are certain tasks that take lots of memory (and > cpu power) which we know the consumer have no capacity to handle this. the > good thing is that we know how much memory (and cpu power) it approximately > can take in advance, so we could prevent a consumer taking that task and > giving a change to other consumer with enough memory to handle. > > There is the prefetch setting but i can't see how it can configure to meet > this requirement > > Finally I found an option to rollback a transaction, so the consumer can > basically check if it has enough hardware resources to handle the task and > if not rollback which retrieves the message back to queue allowing next > consumer take it and so forth. > > Not sure if that's the right approach or there is a better way? > > > > -- > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev- > f2368404.html > --000000000000678440057006b624--