You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Damir Murat <da...@gmail.com> on 2018/06/02 23:51:11 UTC
Artemis 2.6.0 - Why AMQPMessage does not implements
getDuplicateProperty()?
It took me significant time and effort to realize that duplicate message detection is not
implemented for AMQP since AMQPMessage.getDuplicateProperty() simply returns null.
I would like to know some background and reasons for this? It looks to me that ApplicationProperties
can be used for reading appropriate JMS property (_AMQ_DUPL_ID) for this.
In addition, documentation does not mention this clearly. It gives an impression that duplicate
message detection is implemented for all supported protocols.
Is there any chance to get this feature for AMQP in Artemis? Tnx.
Regards,
Damir Murat
Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?
Posted by Justin Bertram <jb...@apache.org>.
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 <da...@gmail.com> 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
>
Re: Artemis 2.6.0 - Why AMQPMessage does not implements
getDuplicateProperty()?
Posted by Damir Murat <da...@gmail.com>.
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
Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?
Posted by Clebert Suconic <cl...@gmail.com>.
I’m typing on the iPhone so I won’t be able to give you links or anything
now. (Its Sunday. If I go close to a computer it drags me to a lot more
work and I don’t want it now :) )
I remember there is a property for duplicates in AMQP. Perhaps we could
return it and the. Fall back to application properties just like other
protocols.
On Sun, Jun 3, 2018 at 7:56 AM Alec Henninger <al...@gmail.com>
wrote:
> Oops, autocorrect. Meant "They *may provide you a supported patch then."
>
> On Sun, Jun 3, 2018, 7:54 AM Alec Henninger <al...@gmail.com>
> wrote:
>
> > Damir, if you have a Red Hat subscription you may have some luck opening
> a
> > case on the customer portal about your use case and problem. They have
> > provide you a supported patch then.
> >
> > On Sat, Jun 2, 2018, 8:32 PM Damir Murat <da...@gmail.com> wrote:
> >
> >> I'm pretty new in AMQP, but you can point me to some resources,
> >> which describe how duplicate detection is supposed to work with AMQP.
> >>
> >> Regarding simple implementation, are there any drawbacks to use
> >> ApplicationProperties
> >> as a basis for implementation?
> >>
> >> And about contribution, as always one problem is time, although I am
> >> interested since
> >> it looks like great learning opportunity. Another problem is that I'm
> >> constrained to use
> >> Red Hat AMQ which lags behind two minor versions.
> >>
> >> Anyway, if you have time, please describe how this can be implemented in
> >> a simple way.
> >> I can't promise quick pull request, but you never know :-)
> >>
> >> Thank you for responding.
> >>
> >> Regards,
> >> Damir Murat
> >>
> >>
>
--
Clebert Suconic
Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?
Posted by Alec Henninger <al...@gmail.com>.
Oops, autocorrect. Meant "They *may provide you a supported patch then."
On Sun, Jun 3, 2018, 7:54 AM Alec Henninger <al...@gmail.com> wrote:
> Damir, if you have a Red Hat subscription you may have some luck opening a
> case on the customer portal about your use case and problem. They have
> provide you a supported patch then.
>
> On Sat, Jun 2, 2018, 8:32 PM Damir Murat <da...@gmail.com> wrote:
>
>> I'm pretty new in AMQP, but you can point me to some resources,
>> which describe how duplicate detection is supposed to work with AMQP.
>>
>> Regarding simple implementation, are there any drawbacks to use
>> ApplicationProperties
>> as a basis for implementation?
>>
>> And about contribution, as always one problem is time, although I am
>> interested since
>> it looks like great learning opportunity. Another problem is that I'm
>> constrained to use
>> Red Hat AMQ which lags behind two minor versions.
>>
>> Anyway, if you have time, please describe how this can be implemented in
>> a simple way.
>> I can't promise quick pull request, but you never know :-)
>>
>> Thank you for responding.
>>
>> Regards,
>> Damir Murat
>>
>>
Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?
Posted by Alec Henninger <al...@gmail.com>.
Damir, if you have a Red Hat subscription you may have some luck opening a
case on the customer portal about your use case and problem. They have
provide you a supported patch then.
On Sat, Jun 2, 2018, 8:32 PM Damir Murat <da...@gmail.com> wrote:
> I'm pretty new in AMQP, but you can point me to some resources,
> which describe how duplicate detection is supposed to work with AMQP.
>
> Regarding simple implementation, are there any drawbacks to use
> ApplicationProperties
> as a basis for implementation?
>
> And about contribution, as always one problem is time, although I am
> interested since
> it looks like great learning opportunity. Another problem is that I'm
> constrained to use
> Red Hat AMQ which lags behind two minor versions.
>
> Anyway, if you have time, please describe how this can be implemented in a
> simple way.
> I can't promise quick pull request, but you never know :-)
>
> Thank you for responding.
>
> Regards,
> Damir Murat
>
>
Re: Artemis 2.6.0 - Why AMQPMessage does not implements
getDuplicateProperty()?
Posted by Damir Murat <da...@gmail.com>.
I'm pretty new in AMQP, but you can point me to some resources,
which describe how duplicate detection is supposed to work with AMQP.
Regarding simple implementation, are there any drawbacks to use ApplicationProperties
as a basis for implementation?
And about contribution, as always one problem is time, although I am interested since
it looks like great learning opportunity. Another problem is that I'm constrained to use
Red Hat AMQ which lags behind two minor versions.
Anyway, if you have time, please describe how this can be implemented in a simple way.
I can't promise quick pull request, but you never know :-)
Thank you for responding.
Regards,
Damir Murat
Re: Artemis 2.6.0 - Why AMQPMessage does not implements getDuplicateProperty()?
Posted by Clebert Suconic <cl...@gmail.com>.
Because AMQP has a different feature for duplicates. And we never got to
implement it.
Perhaps we could come up with a simple implementation. Are you willing to
contribute it ?
On Sat, Jun 2, 2018 at 7:51 PM Damir Murat <da...@gmail.com> wrote:
> It took me significant time and effort to realize that duplicate message
> detection is not
> implemented for AMQP since AMQPMessage.getDuplicateProperty() simply
> returns null.
>
> I would like to know some background and reasons for this? It looks to me
> that ApplicationProperties
> can be used for reading appropriate JMS property (_AMQ_DUPL_ID) for this.
>
> In addition, documentation does not mention this clearly. It gives an
> impression that duplicate
> message detection is implemented for all supported protocols.
>
> Is there any chance to get this feature for AMQP in Artemis? Tnx.
>
> Regards,
> Damir Murat
>
--
Clebert Suconic