OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?


I don't see any reason why you couldn't configure an intra-broker bridge.


Justin

On Wed, Jun 6, 2018 at 5:33 PM, Damir Murat <damir.murat@xxxxxxxxx> wrote:

> It looks like I found a workaround. I've set up core bridge between two
> Artemis servers
> and put simple transformer class on the first one (one that configured
> bridge):
>
> package org.apache.activemq.artemis.jms.example;
>
> import org.apache.activemq.artemis.api.core.Message;
> import org.apache.activemq.artemis.api.core.SimpleString;
> import org.apache.activemq.artemis.core.server.transformer.Transformer;
>
> public class MyTransformer implements Transformer {
>   @Override
>   public Message transform(final Message message) {
>     SimpleString messageDuplicateProperty = message.
> getSimpleStringProperty(Message.HDR_DUPLICATE_DETECTION_ID);
>     message.putExtraBytesProperty(Message.HDR_BRIDGE_DUPLICATE_ID,
> messageDuplicateProperty.getData());
>
>     return message;
>   }
> }
>
> It looks like this work, at least according to my first tests.
>
> There is one thing I would like to know, though. Is it possible to
> configure the
> bridge inside of a single Artemis server? I would like to use only one
> Artemis for
> this workaround, if possible.
>
> Regards,
> Damir Murat
>