git.net

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

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


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

Attachment: signature.asc
Description: Message signed with OpenPGP



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-activemq-users/msg03689.html on line 99
Call Stack
#TimeMemoryFunctionLocation
10.0007363608{main}( ).../msg03689.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-activemq-users/msg03689.html on line 99
Call Stack
#TimeMemoryFunctionLocation
10.0007363608{main}( ).../msg03689.html:0