You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "Rahul.Singh5@morganstanley.com" <Ra...@morganstanley.com> on 2021/07/01 09:04:52 UTC

RE: QPID C++ Subscribing to a topic

Hello,
The broker does not seem to have much understanding of the C++ QPID Messaging API and is more used to the Java version. All it is suggesting to ensure that  we pass the topic in the format "ID.ExampleTopic". However, looking at the AMQP frames from Broker, it seems to misinterpret that topic for a queue, hence there is an unauthorize error reported. ( " is not authorized to create: queue://ID.ExampleTopic" )
From the QPID API usage perspective, do I need to invoke something else to make the topic usage clear. I also experimented with creating a Sender with same topic name but I get the same error. 

Best Regards,
Rahul

-----Original Message-----
From: Gordon Sim <gs...@redhat.com> 
Sent: 30 June 2021 10:01
To: users@qpid.apache.org
Subject: Re: QPID C++ Subscribing to a topic

On Wed, Jun 30, 2021 at 9:40 AM Rahul.Singh5@morganstanley.com <Ra...@morganstanley.com> wrote:
> After being able to establish the connection with the broker at other end, we try to subscribe to a given topic. For this, we create the receiver with string mapping to the topic. ( Id.ExampleTopic ), where Id is the identifier broker assigned to us and ExampleTopic is the topic.
> We have already sought clarification with the broker about this issue, however, we wanted to ensure if the AMQP APIs are being used correctly for this and if we need to somehow communicate that we are subscribing for a topic. (for example, do we need to add some qualifier to the passed string etc.
>
> qpid::messaging::Connection conn(url, options); conn.open();
>
> qpid::messaging::Session session = conn.createSession();
>
> qpid::messaging::Receiver topic_receiver = 
> session.createReceiver("Code.ExampleTopic");


If you are using AMQP 1.0, and the broker treats the creation of a receiver with that pattern as a subscription on a topic, then the client does not require any further configuration.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org


--------------------------------------------------------------------------------
NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers  If you cannot access these links, please notify us by reply message and we will send the contents to you. By communicating with Morgan Stanley you consent to the foregoing and to the voice recording of conversations with personnel of Morgan Stanley.

You may have certain rights regarding the information that Morgan Stanley collects about you.  Please see our Privacy Pledge https://www.morganstanley.com/privacy-pledge for more information about your rights.

Re: QPID C++ Subscribing to a topic

Posted by Robbie Gemmell <ro...@gmail.com>.
The broker will have little idea what it is talking to, they all speak
AMQP 1.0 to each other. The only questions are what you are trying to
do, what the broker requires to be asked to do that, and how you
configure your client to get that.

I'm guessing this may be an ActiveMQ broker from the behaviour. If so,
try adding topic:// as a prefix to the address string to have the
broker understand you want to subscribe to the topic of the following
name, rather than a queue with that name, which is what it assumes
unless asked otherwise.

Robbie

On Thu, 1 Jul 2021 at 10:05, Rahul.Singh5@morganstanley.com
<Ra...@morganstanley.com> wrote:
>
> Hello,
> The broker does not seem to have much understanding of the C++ QPID Messaging API and is more used to the Java version. All it is suggesting to ensure that  we pass the topic in the format "ID.ExampleTopic". However, looking at the AMQP frames from Broker, it seems to misinterpret that topic for a queue, hence there is an unauthorize error reported. ( " is not authorized to create: queue://ID.ExampleTopic" )
> From the QPID API usage perspective, do I need to invoke something else to make the topic usage clear. I also experimented with creating a Sender with same topic name but I get the same error.
>
> Best Regards,
> Rahul
>
> -----Original Message-----
> From: Gordon Sim <gs...@redhat.com>
> Sent: 30 June 2021 10:01
> To: users@qpid.apache.org
> Subject: Re: QPID C++ Subscribing to a topic
>
> On Wed, Jun 30, 2021 at 9:40 AM Rahul.Singh5@morganstanley.com <Ra...@morganstanley.com> wrote:
> > After being able to establish the connection with the broker at other end, we try to subscribe to a given topic. For this, we create the receiver with string mapping to the topic. ( Id.ExampleTopic ), where Id is the identifier broker assigned to us and ExampleTopic is the topic.
> > We have already sought clarification with the broker about this issue, however, we wanted to ensure if the AMQP APIs are being used correctly for this and if we need to somehow communicate that we are subscribing for a topic. (for example, do we need to add some qualifier to the passed string etc.
> >
> > qpid::messaging::Connection conn(url, options); conn.open();
> >
> > qpid::messaging::Session session = conn.createSession();
> >
> > qpid::messaging::Receiver topic_receiver =
> > session.createReceiver("Code.ExampleTopic");
>
>
> If you are using AMQP 1.0, and the broker treats the creation of a receiver with that pattern as a subscription on a topic, then the client does not require any further configuration.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org
>
>
> --------------------------------------------------------------------------------
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers  If you cannot access these links, please notify us by reply message and we will send the contents to you. By communicating with Morgan Stanley you consent to the foregoing and to the voice recording of conversations with personnel of Morgan Stanley.
>
> You may have certain rights regarding the information that Morgan Stanley collects about you.  Please see our Privacy Pledge https://www.morganstanley.com/privacy-pledge for more information about your rights.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: QPID C++ Subscribing to a topic

Posted by Gordon Sim <gs...@redhat.com>.
To specify a :topic capability you can use an address of the form
"ID.ExampleTopic; {node:{type:topic}}".

On Thu, Jul 1, 2021 at 10:10 AM Rahul.Singh5@morganstanley.com
<Ra...@morganstanley.com> wrote:
>
> Hello,
> The broker does not seem to have much understanding of the C++ QPID Messaging API and is more used to the Java version. All it is suggesting to ensure that  we pass the topic in the format "ID.ExampleTopic". However, looking at the AMQP frames from Broker, it seems to misinterpret that topic for a queue, hence there is an unauthorize error reported. ( " is not authorized to create: queue://ID.ExampleTopic" )
> From the QPID API usage perspective, do I need to invoke something else to make the topic usage clear. I also experimented with creating a Sender with same topic name but I get the same error.
>
> Best Regards,
> Rahul
>
> -----Original Message-----
> From: Gordon Sim <gs...@redhat.com>
> Sent: 30 June 2021 10:01
> To: users@qpid.apache.org
> Subject: Re: QPID C++ Subscribing to a topic
>
> On Wed, Jun 30, 2021 at 9:40 AM Rahul.Singh5@morganstanley.com <Ra...@morganstanley.com> wrote:
> > After being able to establish the connection with the broker at other end, we try to subscribe to a given topic. For this, we create the receiver with string mapping to the topic. ( Id.ExampleTopic ), where Id is the identifier broker assigned to us and ExampleTopic is the topic.
> > We have already sought clarification with the broker about this issue, however, we wanted to ensure if the AMQP APIs are being used correctly for this and if we need to somehow communicate that we are subscribing for a topic. (for example, do we need to add some qualifier to the passed string etc.
> >
> > qpid::messaging::Connection conn(url, options); conn.open();
> >
> > qpid::messaging::Session session = conn.createSession();
> >
> > qpid::messaging::Receiver topic_receiver =
> > session.createReceiver("Code.ExampleTopic");
>
>
> If you are using AMQP 1.0, and the broker treats the creation of a receiver with that pattern as a subscription on a topic, then the client does not require any further configuration.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org
>
>
> --------------------------------------------------------------------------------
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers  If you cannot access these links, please notify us by reply message and we will send the contents to you. By communicating with Morgan Stanley you consent to the foregoing and to the voice recording of conversations with personnel of Morgan Stanley.
>
> You may have certain rights regarding the information that Morgan Stanley collects about you.  Please see our Privacy Pledge https://www.morganstanley.com/privacy-pledge for more information about your rights.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org