You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by HrochL <Pe...@seznam.cz> on 2013/10/03 13:00:01 UTC
Qpid Messaging API and topics
Hi,
I would like to use the Qpid Messaging API to send messages into ActiveMQ
from my C++ program. I have a little problem with sending messages into
topics. Address is always regarded as the address of the queue. I read here
<http://activemq.apache.org/amqp.html> that it is necessary to use prefix
"topic://". But when I do it, the message is delivered to the queue named
"topic:" and rest of the address is used as subject of the message.
What am I doing wrong?
Petr
--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-Messaging-API-and-topics-tp7598962.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Qpid Messaging API and topics
Posted by NimbusParc <ni...@yahoo.in>.
Gordon Sim wrote
> On 10/03/2013 12:00 PM, HrochL wrote:
>> Hi,
>> I would like to use the Qpid Messaging API to send messages into ActiveMQ
>> from my C++ program. I have a little problem with sending messages into
>> topics. Address is always regarded as the address of the queue. I read
>> here
>> <http://activemq.apache.org/amqp.html> that it is necessary to
>> use prefix
>> "topic://". But when I do it, the message is delivered to the queue named
>> "topic:" and rest of the address is used as subject of the message.
>> What am I doing wrong?
>
> Short answer: you need to put quotes around the url. E.g.
>
> session.createReceiver("'topic://my-topic-name'");
>
> (note the single quotes inside the string literal).
>
> The reason for this is that the qpid messaging API assumes addresses in
> the form
> <node-name>
> /
> <subject>
> , so without quoting it takes the portion
> up to the first '/' as the node name, and everything thereafter as the
> subject.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@.apache
> For additional commands, e-mail:
> users-help@.apache
+1
--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-Messaging-API-and-topics-tp7598962p7598966.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Qpid Messaging API and topics
Posted by Gordon Sim <gs...@redhat.com>.
On 10/03/2013 12:00 PM, HrochL wrote:
> Hi,
> I would like to use the Qpid Messaging API to send messages into ActiveMQ
> from my C++ program. I have a little problem with sending messages into
> topics. Address is always regarded as the address of the queue. I read here
> <http://activemq.apache.org/amqp.html> that it is necessary to use prefix
> "topic://". But when I do it, the message is delivered to the queue named
> "topic:" and rest of the address is used as subject of the message.
> What am I doing wrong?
Short answer: you need to put quotes around the url. E.g.
session.createReceiver("'topic://my-topic-name'");
(note the single quotes inside the string literal).
The reason for this is that the qpid messaging API assumes addresses in
the form <node-name>/<subject>, so without quoting it takes the portion
up to the first '/' as the node name, and everything thereafter as the
subject.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org