From dev-return-68787-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Tue Jan 8 21:56:15 2019 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 99A28180652 for ; Tue, 8 Jan 2019 21:56:14 +0100 (CET) Received: (qmail 84910 invoked by uid 500); 8 Jan 2019 20:56:13 -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 84898 invoked by uid 99); 8 Jan 2019 20:56:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2019 20:56:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 60A29C7AA2 for ; Tue, 8 Jan 2019 20:56:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fXu3ElosZtb6 for ; Tue, 8 Jan 2019 20:56:10 +0000 (UTC) Received: from pf.iit.de (pf.iit.de [54.75.229.186]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 797C15FAC8 for ; Tue, 8 Jan 2019 20:56:09 +0000 (UTC) X-Footer: aWl0LmRl Received: from [192.168.0.80] ([109.234.145.246]) (authenticated user am@iit.de) by pf.iit.de (Kerio Connect 8.3.2) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) for dev@activemq.apache.org; Tue, 8 Jan 2019 20:56:07 +0000 From: Andreas Mueller Mime-Version: 1.0 (1.0) Date: Tue, 8 Jan 2019 21:55:48 +0100 Subject: Re: Random Access Queues, possible? Message-Id: <5902C623-B455-4F42-A14E-46B58DCBD5C1@iit.de> References: <88FC4DA0-48D9-4341-B13B-BC8ABDA6F81C@iit.de> In-Reply-To: To: dev@activemq.apache.org X-Mailer: iPhone Mail (16C101) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi=2C JMS with selectors and tx as well as AMQP with tx association of individual= messages is supported so there must already be some kind of random queue a= ccess=2E May be it is just not exposed=3F=20 Regards=20 Andreas =3E Am 08=2E01=2E2019 um 18=3A22 schrieb Christopher Shannon =3Cchristopher= =2El=2Eshannon=40gmail=2Ecom=3E=3A =3E=20 =3E Random access queues don=27t make sense for a message broker and is not= =3E supported=2E Based on your use case Artemis or any message broker does= not =3E sound like the correct product=2E =3E=20 =3E It sounds like you need something like one of the many key/value stores= =3E that exist=2E =28you can search around and see what=27s out there=29 =3E=20 =3E=3E On Tue=2C Jan 8=2C 2019 at 7=3A17 AM Andreas Mueller =3Cam=40iit=2Ed= e=3E wrote=3A =3E=3E=20 =3E=3E Hi=2C =3E=3E=20 =3E=3E we have a sub project that currently runs within SwiftMQ as a plugin= and =3E=3E uses SwiftMQ=E2=80=99s Swiftlet API to communicate with the internal= components=2E =3E=3E I=E2=80=99m currently evaluating to port it to Artemis where it shou= ld run as a =3E=3E broker plugin=2E If that is possible with reasonable effort=2C we in= tend to =3E=3E make this sub project available as open source=2E =3E=3E=20 =3E=3E This library uses queues as kind of database=2E We do not want to us= e a real =3E=3E database such as JDBC for it because we want it completely broker ce= ntric =3E=3E without dependencies and we want it transactional consistent=2C e=2E= g=2E when a =3E=3E HA broker fails over=2C the data should be transactional save at the= new HA =3E=3E instance=2E =3E=3E=20 =3E=3E To accomplish this=2C we need random access to queues as specified i= n this =3E=3E little interface=3A =3E=3E=20 =3E=3E public interface RandomAccessQueue =7B =3E=3E /** =3E=3E * Returns keys of all messages in this queue=2E =3E=3E * =40return List of keys =3E=3E */ =3E=3E List=3CObject=3E getKeys=28=29=3B =3E=3E=20 =3E=3E /** =3E=3E * Returns a message by its key=2E The message is not locked=2E= =3E=3E * =40param key =3E=3E * =40return Message =3E=3E */ =3E=3E Message getMessageByKey=28Object key=29=3B =3E=3E=20 =3E=3E /** =3E=3E * Locks all messages for removal by their key =3E=3E * =40param txid Transaction id =3E=3E * =40param keys List of keys =3E=3E */ =3E=3E void lockForRemoval=28Object txid=2C List=3CObject=3E keys=29=3B= =3E=3E=20 =3E=3E /** =3E=3E * Commits a transaction=2E Removes all messages that are locked= in this =3E=3E transaction id=2E =3E=3E * =40param txid Transaction id =3E=3E */ =3E=3E void commit=28Object txid=29=3B =3E=3E=20 =3E=3E /** =3E=3E * Aborts a transaction=2E All messages locked for this transacti= on are =3E=3E simply unlocked=2E =3E=3E * =40param txid Transaction id =3E=3E */ =3E=3E void abort=28Object txid=29=3B =3E=3E =7D =3E=3E=20 =3E=3E I=E2=80=99ve walked through the Artemis docs but did not find a way= to do this=2E =3E=3E=20 =3E=3E Can anyone tell me if that is possible=3F If yes=2C what are the imp= lications =3E=3E in terms of performance if I get a message from an arbitrary positio= n of =3E=3E the queue and remove it=3F I want to avoid a full scan of the transa= ction =3E=3E log=2C for example=2E =3E=3E=20 =3E=3E Thanks! =3E=3E=20 =3E=3E Regards=2C =3E=3E Andreas =3E=3E=20 =3E=3E -- =3E=3E Andreas Mueller =3E=3E IIT Software GmbH =3E=3E http=3A//www=2Eswiftmq=2Ecom =3E=3E=20 =3E=3E=20 =3E=3E=20 =3E=3E=20 =3E=3E=20 =3E=3E IIT Software GmbH =3E=3E Falkenhorst 11=2C 48155 M=C3=BCnster=2C Germany =3E=3E Phone=3A +49 =280=29251 39 72 99 00 =3E=3E Managing Director=3A Andreas M=C3=BCller =3E=3E District Court=3A Amtsgericht M=C3=BCnster=2C HRB 16294 =3E=3E VAT-No=3A DE199945912 =3E=3E=20 =3E=3E This e-mail may contain confidential and/or privileged information= =2E If you =3E=3E are not the intended recipient =28or have received this e-mail in er= ror=29 =3E=3E please notify the sender immediately and destroy this e-mail=2E Any= =3E=3E unauthorized copying=2C disclosure or distribution of the material i= n this =3E=3E e-mail is strictly forbidden=2E =3E=3E=20 =3E=3E=20 IIT Software GmbH Falkenhorst 11=2C 48155 M=C3=BCnster=2C Germany Phone=3A +49 =280=29251 39 72 99 00 Managing Director=3A Andreas M=C3=BCller District Court=3A Amtsgericht M=C3=BCnster=2C HRB 16294 VAT-No=3A DE199945912 This e-mail may contain confidential and/or privileged information=2E If yo= u are not the intended recipient =28or have received this e-mail in error= =29 please notify the sender immediately and destroy this e-mail=2E Any una= uthorized copying=2C disclosure or distribution of the material in this e-m= ail is strictly forbidden=2E