Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 93C8A200BE7 for ; Tue, 20 Dec 2016 21:08:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9240D160B29; Tue, 20 Dec 2016 20:08:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B75E7160B12 for ; Tue, 20 Dec 2016 21:08:46 +0100 (CET) Received: (qmail 3983 invoked by uid 500); 20 Dec 2016 20:08:45 -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 3971 invoked by uid 99); 20 Dec 2016 20:08:45 -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, 20 Dec 2016 20:08:45 +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 21B87CC344 for ; Tue, 20 Dec 2016 20:08:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 0q2-AnsndlPx for ; Tue, 20 Dec 2016 20:08:44 +0000 (UTC) Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.161.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E7DBC5FAD4 for ; Tue, 20 Dec 2016 20:08:43 +0000 (UTC) Received: by mail-yw0-f176.google.com with SMTP id t125so87650996ywc.1 for ; Tue, 20 Dec 2016 12:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FSHkxmdLTp6A5aDx5n8MqIptU1yri4QZdXismUVHKTk=; b=kOgUWP5Q7OHoafP6zDN5+C6t7ThWoj46PW/icVbez7pKcSdIB4IYaqQ3dGI7Zdt5cU fs+HnONMrHlH57n5X1T+6lojUDTiDPrhnxN1Vp7qsYK+xUfoJ44WCxklayk93SloJmRv vgimyNgyCXqMUm/OWyUJPXeAhWz0WFH3RxaEe7Zhq8Od1OCiRCXHLn2xJaLw2TFyyU98 iQLJYNEeo4gunPVK2NwRWw/Etw6m5Rhp7gfbuiKaJRYxP+Ob1p5csowbJOlOux4wwlFB PD+MPKPhhnLTDXxCylTnP35S2TnjfLqc7HNHyoSVBsugytzHaZnb+nr/9zxOneGmmBZt LnrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FSHkxmdLTp6A5aDx5n8MqIptU1yri4QZdXismUVHKTk=; b=Z7opAlOa+kKPWPLQ30KQYGjFajSH0Xei0jkDLsrLJjIavcCiOY+lG7KgpLpsY1uWvX Un+gZvm9vr0wifMG2EBgD1W/aF/lGftuXWSxcyfeMKwGiiLrlRQIsyRQWHvDSjfqPq4Q Xy9UJTIYAe7r0AqNdpgpgOHFXVmhCThKi7Irrz1JfUpPtFtRWRmTcnrFbc+orMN9g950 g0kGkFKcbD6yIoUfqau5VdjbiloIds8NRVFpcAqzLVLqD0qKHlPRT4HLSLWUsR/npTRf R1lUMkxZscW+qfNqi7Awik2no00a3Ji5p0CO/Y+6NQb2v69l0RCHww1fa32WUIsOb3ma CaCw== X-Gm-Message-State: AIkVDXKid+ccWoi4z4KRA05BJPo+uNuKFA/Ee3wk8p4VHYmfvpymm+tNDe20jt0OeYmInGbp9EUa9grtNSw97w== X-Received: by 10.129.145.134 with SMTP id i128mr832318ywg.35.1482264508372; Tue, 20 Dec 2016 12:08:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.84.85 with HTTP; Tue, 20 Dec 2016 12:08:27 -0800 (PST) In-Reply-To: References: <2c22bee4-5d67-c764-fe6b-4a5cd2e14999@gmail.com> <166f2ace-e11c-2cba-21ff-feeebb775057@gmail.com> From: Clebert Suconic Date: Tue, 20 Dec 2016 15:08:27 -0500 Message-ID: Subject: Re: [DISCUSS] Artemis plugins ARTEMIS-898 To: "dev@activemq.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Tue, 20 Dec 2016 20:08:47 -0000 Artemis already has the notification listener in place: These are the notification currently supported: https://github.com/apache/activemq-artemis/blob/master/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/CoreNotificationType.java There are a few more that still didn't merge the core model yet: https://github.com/apache/activemq-artemis/blob/master/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/management/JMSNotificationType.java On Tue, Dec 20, 2016 at 2:43 PM, Christopher Shannon wrote: > A plugin API is actually one of the big things on my list as well. In > 5.x it is very easy to add extra functionality at certain points in > the chain (on a new connection, new consumer, etc) and I think having > some mechanism to do that in Artemis will be useful as well. I use a > combination of plugins that come out of the box with 5.x as well as > custom ones that are specific to my use case. > > I opened up https://issues.apache.org/jira/browse/ARTEMIS-796 for > Advisory support and it might be a good candidate as a plugin as Matt > pointed out. > > On Tue, Dec 20, 2016 at 11:54 AM, Clebert Suconic > wrote: >> The inbound would transform the message before it enters the broker. >> >> >> Outbound would only apply to the current delivery. >> >> >> It would be a nice feature. >> On Tue, Dec 20, 2016 at 11:44 AM Matt Pavlovich wrote: >> >>> Clebert- >>> >>> >>> >>> I think outbound/inbound separation would be really handy for plugin >>> >>> writers. Are these statements correct based on what you are thinking w/ >>> >>> inbound and outbound? >>> >>> >>> >>> 1. The outboundTransformer() would transform messages for one or more >>> >>> client consumer(s) and across protocols. ie.. one JMS consumer, one >>> >>> STOMP consumer on the same address would receive the transformed copy of >>> >>> the message. >>> >>> >>> >>> 2. The outboundTransformer would _not_ transformation messages being >>> >>> sent to other brokers (replication and/or pub+sub to brokers in a cluster) >>> >>> >>> >>> 3. For the inboundTransformer.. the message would be transformed for all >>> >>> delivery into the broker for all consumers, brokers and diverts. >>> >>> >>> >>> Thanks, >>> >>> Matt >>> >>> >>> >>> On 12/20/16 10:33 AM, Clebert Suconic wrote: >>> >>> > I think we should include two options on AddressSettings: >>> >>> > >>> >>> > i - inboundTransformer >>> >>> > ii - maybe an outboundTransformer >>> >>> > >>> >>> > inboundTransformer (String address, ServerSession session, >>> >>> > ServerMessage message); >>> >>> > outboundTransformer(String address, ServerSession session, >>> >>> > ServerMessage message); >>> >>> > >>> >>> > >>> >>> > The trick part here is that outboundTransformer would need to work on >>> >>> > a copy of the message. so, the API needs to return a copy of the >>> >>> > message. >>> >>> > >>> >>> > >>> >>> > >>> >>> > I am working now on refactoring encoding and transformer between >>> >>> > protocols that would make this a bit easier. I'm at the design phase >>> >>> > and I will post a DISCUSS thread about that when I have something more >>> >>> > concrete to talk about it. >>> >>> > >>> >>> > >>> >>> > >>> >>> > >>> >>> > On Tue, Dec 20, 2016 at 11:22 AM, Matt Pavlovich >>> wrote: >>> >>> >> I was taking a first step in implementing an existing ActiveMQ 5.x >>> plugin in >>> >>> >> the Artemis source and noticed that there is a gap in the availability >>> of >>> >>> >> extension points in Artemis (or plugins). >>> >>> >> >>> >>> >> I opened ARTEMIS-898 for tracking, and thought it deserved a discussion. >>> >>> >> This feels like a good target as a 2.x feature, since it would most >>> likely >>> >>> >> be API changing. It stands to reason the extension points in Artemis >>> would >>> >>> >> be very different than ActiveMQ 5.x, so I've laid it out in terms of >>> >>> >> features and capabilities. >>> >>> >> >>> >>> >> The big three: >>> >>> >> >>> >>> >> 1. Message header / property manipulation. Allows admins to set message >>> >>> >> policies for things like JMSXUserId, Timestamps, Expiry, etc >>> >>> >> >>> >>> >> 2. Message body manipulation. (Clebert mentioned perhaps an extension of >>> >>> >> Divert / Transformers?) >>> >>> >> >>> >>> >> 3. Activity tracing for audit tracing and/or triggering other activity >>> >>> >> (extension point at PostOffice and ActiveMQServer ?) >>> >>> >> >>> >>> >> One side benefit might be that Advisory support becomes a plugin vs an >>> >>> >> ingrained feature. Could be handy to have all the advisory logic in one >>> >>> >> place to allow more customization of behavior. >>> >>> >> >>> >>> >> Thoughts? >>> >>> >> >>> >>> >> -Matt Pavlovich >>> >>> >> >>> >>> >> >>> >>> > >>> >>> > >>> >>> >>> >>> -- Clebert Suconic