You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "David Martin (Jira)" <ji...@apache.org> on 2021/03/25 14:39:00 UTC

[jira] [Closed] (ARTEMIS-2633) Enhance broker plugin framework to facilitate ActiveMQ v5 plugin migration

     [ https://issues.apache.org/jira/browse/ARTEMIS-2633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Martin closed ARTEMIS-2633.
---------------------------------
    Resolution: Won't Do

Found an easier way using exceptions

> Enhance broker plugin framework to facilitate ActiveMQ v5 plugin migration
> --------------------------------------------------------------------------
>
>                 Key: ARTEMIS-2633
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2633
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: David Martin
>            Priority: Major
>
> Note I intend to implement this ticket myself and submit a PR but want a ticket to track it with (and make sure there is general agreement with what I'm proposing first).
> I am trying to migrate a service from ActiveMQ v5 "classic" to ActiveMQ Artemis - which on the whole is going to be painless with many benefits gained like better performance, JMSv2, high availability on durable topic subs, to name but a few.
>  
> However there is one blocker, in that the ActiveMQ v5 broker plugin framework is a little more extensive in terms of what it enables one to do than the Artemis equivalent.
>  
> The use case is that the ActiveMQv5 clients of this particular service subscribe to what I call a "pseudo topic" like {{"subscription.1"}} which needs to be mapped to a real topic string broker-side depending on the user's content rights e.g. {{"foo.*.bar.#"}}. Also a message selector is generally added to narrow it down further.
>  
> Also, subscribers need to be identified as having a "customer" role before their subscriptions are manipulated in this way.
>  
> What's verified as already possible in Artemis is:
>  
> 1. Override the {{Filter}} in {{beforeCreateConsumer()}}
> 2. Override message content & headers in {{beforeSend()}} as per existing broker plugin example
>  
> What's *missing* in order to migrate my existing AMQv5 plugin and hence the reason for raising this ticket is:
> 1. Add {{List<String> userRoles}} to {{ActiveMQServerSessionPlugin.beforeCreateSession()}} params so that a plugin can track users of interest based on their role(s)
>  
> 2. Extend the plugin architecture with hooks into {{ServerSessionImpl.createAddress()}} e.g. as {{String ActiveMQServerPlugin.beforeCreateAddress(String name, RoutingType routingType, boolean autoCreated)}} (with a default impl returning the same name) to be able to override the name before creation. The existing plugin methods on Address are too late to actually override it.  For completeness will also add void {{ActiveMQServerPlugin.afterCreateAddress(AddressInfo addressInfo, boolean autoCreated)}}. 
> The concept behind (2) is proven by overriding the address name in a debugger. It succeeded without error whether the address existed already or not (after being overridden).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)