Hi Domenico,

thank you for the helpful reply. I never extended the Broker, but it seems 
as if time finally has come now.
After googling around I noticed I'm not alone. Other people seem to hit 
this issue, too when migrating to Artemis. 
Don't you think it would be a good idea to officially deploy an extension 
with this transformer?

Regards

Herbert





Von:    "Domenico Francesco Bruscino" <bruscin...@gmail.com>
An:     users@activemq.apache.org
Datum:  08.09.2023 09:21
Betreff:        [Ext] Re: Re: virtualDestinationInterceptor in Artemis



Hi Herbert,

to implement the wild-card expansion you could use a custom transformer
[1], i.e.

public class PrefixAddressTransformer implements Transformer {
   @Override
   public Message transform(Message message) {
      SimpleString originalAddress =
(SimpleString)message.getBrokerProperty(Message.HDR_ORIGINAL_ADDRESS);
      message.setAddress(message.getAddress() + "." +
 originalAddress.toString());
      return message;
   }
}

      <diverts>
         <divert name="sports-events-divert">
            <address>sports.events.#</address>
            <forwarding-address>SportQ</forwarding-address>
            <exclusive>true</exclusive>

<transformer-class-name>org.apache.activemq.artemis.core.server.transformer.PrefixAddressTransformer</transformer-class-name>
         </divert>
      </diverts>

[1]
https://activemq.apache.org/components/artemis/documentation/latest/transformers.html


Regards,
Domenico


On Thu, 7 Sept 2023 at 12:00, <herbert.helmstr...@systema.com> wrote:

> Hi Domenico,
>
> thank you so much for pointing to the right thing.
> A collegue had found that already and I did not believe him.
> Can we expect  wild-card expansion, i.e
>
> . a divert address
>         sports.events.>
>  would write into a queue
>         SportQ.sports.events.football.matches
> for a message on topic
>         sports.events.football.matches
> This is  what classic does....
>
> Best Regards
>
> Herbert
> ------------------------------
>
> *Herbert Helmstreit*
> Senior Software Engineer
>
> Phone: +49 941 / 7 83 92 36
> herbert.helmstr...@systema.com
>
> www.systema.com
>
> [image: LinkedIn] <https://www.linkedin.com/company/systema-gmbh/
>[image:
> Facebook] <https://de-de.facebook.com/SYSTEMA.automation/>[image: XING]
> <https://www.xing.com/pages/systemagmbh>
>
> SYSTEMA
> Systementwicklung Dipl.-Inf. Manfred Austen GmbH
>
> Manfred-von-Ardenne-Ring 6 | 01099 Dresden
> HRB 11256 Amtsgericht Dresden | USt.-ID DE 159 607 786
> Geschäftsführer: Manfred Austen, CEO und Dr. Ulf Martin, COO
>
>
>
>
> Von:        "Domenico Francesco Bruscino" <bruscin...@gmail.com>
> An:        users@activemq.apache.org
> Datum:        07.09.2023 09:21
> Betreff:        [Ext] Re: virtualDestinationInterceptor in Artemis
> ------------------------------
>
>
>
> Hi Herbert,
>
> you could use ActiveMQ Artemis exclusive diverts[1], i.e.
>
> <divert name="sports-events-divert">
>   <address>sports.events</address>
>   <forwarding-address>SportQ</forwarding-address>
>   <exclusive>true/exclusive>
> </divert>
>
> [1]
>
> 
https://activemq.apache.org/components/artemis/documentation/latest/diverts.html

>
> Regards,
> Domenico
>
>
>
> On Wed, 6 Sept 2023 at 18:48, <herbert.helmstr...@systema.com> wrote:
>
> > Hello Group,
> >
> > with ActiveMQ classic wa are using virtualDestinationInterceptor to
> > redirect Event messages into a queue
> > to consume them as kind of Unique Processing by distributed 
applications.
> > For this purpose the aktivemq.xml contains within the broker bean
> >
> > <destinationInterceptors>
> >   <virtualDestinationInterceptor>
> >     <virtualDestinations>
> >        <virtualTopic name="sports.events.>" prefix="SportQ."
> > selectorAware="false"/>
> >      </virtualDestinations>
> >    </virtualDestinationInterceptor>
> > </destinationInterceptors>
> >
> > Is there a similar technique with Artemis?
> > I did not find something like.
> >
> > Regards
> >
> > Herbert
> >
> > ------------------------------
> >
> > *Herbert Helmstreit*
> > Senior Software Engineer
> >
> > Phone: +49 941 / 7 83 92 36
> > herbert.helmstr...@systema.com
> >
> > www.systema.com
> >
> > [image: LinkedIn] <https://www.linkedin.com/company/systema-gmbh/
> >[image:
> > Facebook] <https://de-de.facebook.com/SYSTEMA.automation/>[image: 
XING]
> > <https://www.xing.com/pages/systemagmbh>
> >
> > SYSTEMA
> > Systementwicklung Dipl.-Inf. Manfred Austen GmbH
> >
> > Manfred-von-Ardenne-Ring 6 | 01099 Dresden
> > HRB 11256 Amtsgericht Dresden | USt.-ID DE 159 607 786
> > Geschäftsführer: Manfred Austen, CEO und Dr. Ulf Martin, COO
> >
> >
>
>
>
>




Reply via email to