You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Gavrila, Daniel" <D....@leonardogermany.com> on 2022/10/21 09:14:09 UTC

Filter with the subject

Hello ,

I have a divert that I would like to forward to a LVQ just if the message has the subject set to the string "DesignMessage". In the documentation there are some
Identifiers like AMQPriority , AMQExpiration etc. and tried my luck with AMQSubject but is not working. No messages are  coming  in LVQ

My config is this:

<divert name="Divert.METForWTS.A_TB_WDS_Tw">
  <address>METForWTS.A_TB_WDS_Tw</address>
  <filter string="AMQSubject='DesignMessage'"  />
  <forwarding-address>METForWTS.A_TB_WDS_Tw.LVQ</forwarding-address>
  <exclusive>false</exclusive>
</divert>

Many thanks,
Daniel
LEONARDO Germany GmbH
Sitz der Gesellschaft / Registered Office: Neuss
Registergericht / Register Court: Neuss HRB 17453
Gesch?ftsf?hrer / Managing Director: Maurizio De Mitri

Re: Filter with the subject

Posted by "Gavrila, Daniel" <D....@leonardogermany.com>.
thanks! it is working now! 😊


Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Domenico Francesco Bruscino <br...@gmail.com>
Sent: Friday, October 21, 2022 7:23:55 PM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: Filter with the subject

Hi Daniel,

the AMQP subject is mapped with JMSType, see
testReceiveWithJMSSelectorFilterOnJMSType[1], try JMSType='DesignMessage'.

[1]
https://github.com/apache/activemq-artemis/blob/2.26.0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java#L506

Regards,
Domenico

On Fri, 21 Oct 2022 at 18:52, Gavrila, Daniel <D....@leonardogermany.com>
wrote:

> Hi Domenico,
>
> I‘m porting an application from
> qpid-cpp broker to Artemis, it is just AMQP . On the client side I‘m using
> qpid proton C++ library and the code is looking like this:
>
> proton::message m;
> m.subject(„DesignMessage“);
>
> The „subject“ is the standard AMQP property . On the qpid broker this was
> the way to get the messages also in the LVQ queue.
>
> Many thanks,
> Daniel
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Domenico Francesco Bruscino <br...@gmail.com>
> Sent: Friday, October 21, 2022 5:15:02 PM
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: Filter with the subject
>
> Hi Daniel,
>
> what protocol are you using to send messages?
> Where are you setting the subject for your messages: in the body or in the
> properties?
>
> Regards,
> Domenico
>
> On Fri, 21 Oct 2022 at 11:15, Gavrila, Daniel <
> D.Gavrila@leonardogermany.com>
> wrote:
>
> > Hello ,
> >
> > I have a divert that I would like to forward to a LVQ just if the message
> > has the subject set to the string "DesignMessage". In the documentation
> > there are some
> > Identifiers like AMQPriority , AMQExpiration etc. and tried my luck with
> > AMQSubject but is not working. No messages are  coming  in LVQ
> >
> > My config is this:
> >
> > <divert name="Divert.METForWTS.A_TB_WDS_Tw">
> >   <address>METForWTS.A_TB_WDS_Tw</address>
> >   <filter string="AMQSubject='DesignMessage'"  />
> >   <forwarding-address>METForWTS.A_TB_WDS_Tw.LVQ</forwarding-address>
> >   <exclusive>false</exclusive>
> > </divert>
> >
> > Many thanks,
> > Daniel
> > LEONARDO Germany GmbH
> > Sitz der Gesellschaft / Registered Office: Neuss
> > Registergericht / Register Court: Neuss HRB 17453
> > Gesch?ftsf?hrer / Managing Director: Maurizio De Mitri
> >
> LEONARDO Germany GmbH
> Sitz der Gesellschaft / Registered Office: Neuss
> Registergericht / Register Court: Neuss HRB 17453
> Geschäftsführer / Managing Director: Maurizio De Mitri
>
LEONARDO Germany GmbH
Sitz der Gesellschaft / Registered Office: Neuss
Registergericht / Register Court: Neuss HRB 17453
Geschäftsführer / Managing Director: Maurizio De Mitri

Re: Filter with the subject

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi Daniel,

the AMQP subject is mapped with JMSType, see
testReceiveWithJMSSelectorFilterOnJMSType[1], try JMSType='DesignMessage'.

[1]
https://github.com/apache/activemq-artemis/blob/2.26.0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveTest.java#L506

Regards,
Domenico

On Fri, 21 Oct 2022 at 18:52, Gavrila, Daniel <D....@leonardogermany.com>
wrote:

> Hi Domenico,
>
> I‘m porting an application from
> qpid-cpp broker to Artemis, it is just AMQP . On the client side I‘m using
> qpid proton C++ library and the code is looking like this:
>
> proton::message m;
> m.subject(„DesignMessage“);
>
> The „subject“ is the standard AMQP property . On the qpid broker this was
> the way to get the messages also in the LVQ queue.
>
> Many thanks,
> Daniel
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Domenico Francesco Bruscino <br...@gmail.com>
> Sent: Friday, October 21, 2022 5:15:02 PM
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: Filter with the subject
>
> Hi Daniel,
>
> what protocol are you using to send messages?
> Where are you setting the subject for your messages: in the body or in the
> properties?
>
> Regards,
> Domenico
>
> On Fri, 21 Oct 2022 at 11:15, Gavrila, Daniel <
> D.Gavrila@leonardogermany.com>
> wrote:
>
> > Hello ,
> >
> > I have a divert that I would like to forward to a LVQ just if the message
> > has the subject set to the string "DesignMessage". In the documentation
> > there are some
> > Identifiers like AMQPriority , AMQExpiration etc. and tried my luck with
> > AMQSubject but is not working. No messages are  coming  in LVQ
> >
> > My config is this:
> >
> > <divert name="Divert.METForWTS.A_TB_WDS_Tw">
> >   <address>METForWTS.A_TB_WDS_Tw</address>
> >   <filter string="AMQSubject='DesignMessage'"  />
> >   <forwarding-address>METForWTS.A_TB_WDS_Tw.LVQ</forwarding-address>
> >   <exclusive>false</exclusive>
> > </divert>
> >
> > Many thanks,
> > Daniel
> > LEONARDO Germany GmbH
> > Sitz der Gesellschaft / Registered Office: Neuss
> > Registergericht / Register Court: Neuss HRB 17453
> > Gesch?ftsf?hrer / Managing Director: Maurizio De Mitri
> >
> LEONARDO Germany GmbH
> Sitz der Gesellschaft / Registered Office: Neuss
> Registergericht / Register Court: Neuss HRB 17453
> Geschäftsführer / Managing Director: Maurizio De Mitri
>

Re: Filter with the subject

Posted by "Gavrila, Daniel" <D....@leonardogermany.com>.
Hi Domenico,

I‘m porting an application from
qpid-cpp broker to Artemis, it is just AMQP . On the client side I‘m using qpid proton C++ library and the code is looking like this:

proton::message m;
m.subject(„DesignMessage“);

The „subject“ is the standard AMQP property . On the qpid broker this was the way to get the messages also in the LVQ queue.

Many thanks,
Daniel

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Domenico Francesco Bruscino <br...@gmail.com>
Sent: Friday, October 21, 2022 5:15:02 PM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: Filter with the subject

Hi Daniel,

what protocol are you using to send messages?
Where are you setting the subject for your messages: in the body or in the
properties?

Regards,
Domenico

On Fri, 21 Oct 2022 at 11:15, Gavrila, Daniel <D....@leonardogermany.com>
wrote:

> Hello ,
>
> I have a divert that I would like to forward to a LVQ just if the message
> has the subject set to the string "DesignMessage". In the documentation
> there are some
> Identifiers like AMQPriority , AMQExpiration etc. and tried my luck with
> AMQSubject but is not working. No messages are  coming  in LVQ
>
> My config is this:
>
> <divert name="Divert.METForWTS.A_TB_WDS_Tw">
>   <address>METForWTS.A_TB_WDS_Tw</address>
>   <filter string="AMQSubject='DesignMessage'"  />
>   <forwarding-address>METForWTS.A_TB_WDS_Tw.LVQ</forwarding-address>
>   <exclusive>false</exclusive>
> </divert>
>
> Many thanks,
> Daniel
> LEONARDO Germany GmbH
> Sitz der Gesellschaft / Registered Office: Neuss
> Registergericht / Register Court: Neuss HRB 17453
> Gesch?ftsf?hrer / Managing Director: Maurizio De Mitri
>
LEONARDO Germany GmbH
Sitz der Gesellschaft / Registered Office: Neuss
Registergericht / Register Court: Neuss HRB 17453
Geschäftsführer / Managing Director: Maurizio De Mitri

Re: Filter with the subject

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi Daniel,

what protocol are you using to send messages?
Where are you setting the subject for your messages: in the body or in the
properties?

Regards,
Domenico

On Fri, 21 Oct 2022 at 11:15, Gavrila, Daniel <D....@leonardogermany.com>
wrote:

> Hello ,
>
> I have a divert that I would like to forward to a LVQ just if the message
> has the subject set to the string "DesignMessage". In the documentation
> there are some
> Identifiers like AMQPriority , AMQExpiration etc. and tried my luck with
> AMQSubject but is not working. No messages are  coming  in LVQ
>
> My config is this:
>
> <divert name="Divert.METForWTS.A_TB_WDS_Tw">
>   <address>METForWTS.A_TB_WDS_Tw</address>
>   <filter string="AMQSubject='DesignMessage'"  />
>   <forwarding-address>METForWTS.A_TB_WDS_Tw.LVQ</forwarding-address>
>   <exclusive>false</exclusive>
> </divert>
>
> Many thanks,
> Daniel
> LEONARDO Germany GmbH
> Sitz der Gesellschaft / Registered Office: Neuss
> Registergericht / Register Court: Neuss HRB 17453
> Gesch?ftsf?hrer / Managing Director: Maurizio De Mitri
>