You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by eric73 <er...@eaton.com> on 2016/08/01 12:34:04 UTC

Qpid dispatch router issue

Hi all,

I’m  working on a C++ project developed with Qpid libraries on Linux.
I try to use the Qpid C++ messaging API (AMQP 1.0 protocol) with the
dispatch router but I have several issues.
First, I use the latest PPA packages available for my distribution (Linux
mint 17.3 based on Ubuntu 14.04):
-qpid-proton: 0.11.1-2 
-qpid-cpp: 0.34-2
-qpid dispatch: 0.5-4
I make two programs with Qpid C++ messaging API, one which send messages to
a remote broker (ActiveMQ with AMQP 1.0 protocol) and another one (running
on the same machine) which receive these messages.
The programs work correctly when the connection is direct with the remote
broker.
I use a queue (“test_queue”) and a topic ("'topic://test_topic'" -> double
quotes are necessary for topic) for the test.
But if a use the dispatch router, it works only when I address a queue on
the broker but it doesn't works when I address a topic on the broker.
In all case, I use only anonymous connection with the broker.

Then, I update the libraries with the latest version available (make
complete compilation on the same Linux mint distribution). 
-qpid-proton: 0.13.1
-qpid-cpp: 0.34
-qpid dispatch: 0.60
Without the dispatch router, the programs work correctly. 
With the dispatch router, the same programs not work in all case when I
address a queue or a topic on the broker.
I have this error on the log of the dispatcher each time I try to send or
receive a message :
“CONTAINER (notice) Aborting link
'test_queue_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' due to parent session
end.”

Any help will be appreciate
Thanks 
Regards



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428.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 dispatch router issue

Posted by Robbie Gemmell <ro...@gmail.com>.
Its best if you start a new thread for new discussions, that way
unrelated issues get their own thread and it is easier for people to
follow / join in / find later etc.

<Rest of original typed message deleted due to being double-ninja'd by
Gordon's mails saying the same thing> :P

Robbie

On 24 August 2016 at 12:49, lucas <zh...@163.com> wrote:
> hi,Ted Ross.
> I have some questions about dispatch.I use it lasterday and I find that it's
> report error when I use ./qpidd and ./qdrouterd at the same time.Report As
> follow:
>         warning Couldn't listen to: 0.0.0.0:5672: Can't bind to port
> 0.0.0.0:5672: Address already in use
> Here is my routerd.conf setting:
>  router {
>     mode: standalone
>     id: Router.A
> }
>
> listener {
>     host: 127.0.0.1
>     port: 5672
>     authenticatePeer: no
> }
>
> connector {
>     name: broker
>     role: route-container
>     host: 127.0.0.1
>     port: 5672
>     sasl-mechanisms: ANONYMOUS
> }
>
> address {
>     prefix: queue
>     waypoint: yes
> }
>
> autoLink {
>     addr: queue.first
>     dir: in
>     connection: broker
> }
>
> autoLink {
>     addr: queue.first
>     dir: out
>     connection: broker
> }
>
> Since I am new in QIPD and any help is appreciated.
>
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7649538.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
>

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


Re: Qpid dispatch router issue

Posted by Gordon Sim <gs...@redhat.com>.
On 24/08/16 12:52, Gordon Sim wrote:
> On 24/08/16 12:49, lucas wrote:
>> hi,Ted Ross.
>> I have some questions about dispatch.I use it lasterday and I find
>> that it's
>> report error when I use ./qpidd and ./qdrouterd at the same
>> time.Report As
>> follow:
>>         warning Couldn't listen to: 0.0.0.0:5672: Can't bind to port
>> 0.0.0.0:5672: Address already in use
>
> You have something else listening on the 5672 port on that machine. Most
> likely an AMQP broker (or perhaps another router instance).
>
Sorry, I was a it too quick there. I see you did actually already 
mention that you had qpidd running.

They can't both listen on the same port on the same machine. You can 
alter the port in the qdrouterd config e.g.

listener {
     host: 127.0.0.1
     port: 5673
     authenticatePeer: no
}

or you can alter the port qpidd is listening on (either with --port 5673 
on the command line or port=5673 in the config file). (You don't need to 
use 5673 either, it can be any unused port)

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


Re: Qpid dispatch router issue

Posted by Gordon Sim <gs...@redhat.com>.
On 24/08/16 12:49, lucas wrote:
> hi,Ted Ross.
> I have some questions about dispatch.I use it lasterday and I find that it's
> report error when I use ./qpidd and ./qdrouterd at the same time.Report As
> follow:
>         warning Couldn't listen to: 0.0.0.0:5672: Can't bind to port
> 0.0.0.0:5672: Address already in use

You have something else listening on the 5672 port on that machine. Most 
likely an AMQP broker (or perhaps another router instance).


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


Re: Qpid dispatch router issue

Posted by lucas <zh...@163.com>.
hi,Ted Ross.
I have some questions about dispatch.I use it lasterday and I find that it's
report error when I use ./qpidd and ./qdrouterd at the same time.Report As
follow:
        warning Couldn't listen to: 0.0.0.0:5672: Can't bind to port
0.0.0.0:5672: Address already in use
Here is my routerd.conf setting:
 router {
    mode: standalone
    id: Router.A
}

listener {
    host: 127.0.0.1
    port: 5672
    authenticatePeer: no
}

connector {
    name: broker
    role: route-container
    host: 127.0.0.1
    port: 5672
    sasl-mechanisms: ANONYMOUS
}

address {
    prefix: queue
    waypoint: yes
}

autoLink {
    addr: queue.first
    dir: in
    connection: broker
}

autoLink {
    addr: queue.first
    dir: out
    connection: broker
}

Since I am new in QIPD and any help is appreciated.




--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7649538.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 dispatch router issue

Posted by eric73 <er...@eaton.com>.
Hi Paolo,
I try "route-container" instead of "on-demand" and it is the same problem of
timeout.
Thanks for the reply.
Regards
Eric



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648648.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 dispatch router issue

Posted by Paolo Patierno <pp...@live.com>.
Hi,

the role for the connector should be "route-container" not "on-demand".

Regards,
Paolo.

Paolo PatiernoSenior Software Engineer (IoT) @ Red Hat
Microsoft MVP on Windows Embedded & IoTMicrosoft Azure Advisor 
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

> Date: Wed, 3 Aug 2016 05:45:30 -0700
> From: ericclappier@eaton.com
> To: users@qpid.apache.org
> Subject: Re: Qpid dispatch router issue
> 
> Thank Ted.
> I set "standalone" mode for the router configuration.
> But now the dispatch router seems have problem when it try to connect to the
> broker.
> Indefinitely, there is a timeout error after connection: "local-idle-timeout
> expired".
> Here is the dispatch router log:
> ...
> 
> ...
> 
> Regards
> 
> 
> 
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648633.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 dispatch router issue

Posted by eric73 <er...@eaton.com>.
Thanks a lot now it is working with prefix: topic://test_topic
But I must use double quote + simple quote for qpid messaging API otherwise
it didn't recognize that it was a topic and it created a queue whose name
was "topic_". 




--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648732.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 dispatch router issue

Posted by Gordon Sim <gs...@redhat.com>.
On 04/08/16 07:33, eric73 wrote:
> Hi,
> Thanks, I updated my ActiveMQ broker with 5.12.3 version and it seems
> resolve the timeout problem.
> But I still have problem to send data on a topic of the broker.
> It worked correctly with a queue but not with a topic.
> - For the queue, the name is "test_queue".
> In client messaging API, I used:
>
> And in the qdrouterd.conf, the syntax is:
>
> - For the topic, the name is "test_topic".
> In client messaging API, I used:
>
> And in the qdrouterd.conf, the syntax is:
>
> I used double quote + simple quote for the topic as describe on the qpid
> forum.
> Is there a problem with the syntax of the prefix for the topic ?

You only need to quote with the qpid messaging API (because otherwise it 
treats the '/' as separating the 'node' from the 'subject').

In the router conf file you can use the topic 'url' directly, e.g. 
topic://mytopic


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


Re: Qpid dispatch router issue

Posted by eric73 <er...@eaton.com>.
Hi,
Thanks, I updated my ActiveMQ broker with 5.12.3 version and it seems
resolve the timeout problem.
But I still have problem to send data on a topic of the broker.
It worked correctly with a queue but not with a topic.
- For the queue, the name is "test_queue".
In client messaging API, I used:

And in the qdrouterd.conf, the syntax is:

- For the topic, the name is "test_topic".
In client messaging API, I used:

And in the qdrouterd.conf, the syntax is:

I used double quote + simple quote for the topic as describe on the qpid
forum.
Is there a problem with the syntax of the prefix for the topic ?
Regards
Eric




--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648713.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 dispatch router issue

Posted by Robbie Gemmell <ro...@gmail.com>.
On 3 August 2016 at 15:52, Gordon Sim <gs...@redhat.com> wrote:
> On 03/08/16 15:13, Robbie Gemmell wrote:
>>
>> ActiveMQ 5.9.0 is rather old and its AMQP 1.0 support was fairly
>> recent at the time, its changed a lot since then. You'll want to try a
>> newer version. 5.13.4 is the current, with 5.14.0 currently under vote
>> for release.
>
>
> Yes, if I recall correctly 5.9 did not implement heartbeats which is why the
> router is terminating the connection.

Correct. I hadn't read the earlier message yet or I'd probably have
pointed that out too. It wasnt supported for a while after that, I
think 5.12.0 perhaps.

> You may be able to workaround that be
> setting the idleTimeoutSeconds for the connector to 0. However as Robbie
> says, it would be better to update the broker as there will be many other
> potential issues fixed by that.
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Qpid dispatch router issue

Posted by Gordon Sim <gs...@redhat.com>.
On 03/08/16 15:13, Robbie Gemmell wrote:
> ActiveMQ 5.9.0 is rather old and its AMQP 1.0 support was fairly
> recent at the time, its changed a lot since then. You'll want to try a
> newer version. 5.13.4 is the current, with 5.14.0 currently under vote
> for release.

Yes, if I recall correctly 5.9 did not implement heartbeats which is why 
the router is terminating the connection. You may be able to workaround 
that be setting the idleTimeoutSeconds for the connector to 0. However 
as Robbie says, it would be better to update the broker as there will be 
many other potential issues fixed by that.


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


Re: Qpid dispatch router issue

Posted by Robbie Gemmell <ro...@gmail.com>.
ActiveMQ 5.9.0 is rather old and its AMQP 1.0 support was fairly
recent at the time, its changed a lot since then. You'll want to try a
newer version. 5.13.4 is the current, with 5.14.0 currently under vote
for release.

On 3 August 2016 at 14:37, eric73 <er...@eaton.com> wrote:
> Hello Sim,
> I use Apache ActiveMQ broker 5.9.0 with AMQP1.0 on Windows 7 Entreprise.
> The clients run on Linux mint 17.3.
>
>
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648644.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
>

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


Re: Qpid dispatch router issue

Posted by eric73 <er...@eaton.com>.
Hello Sim, 
I use Apache ActiveMQ broker 5.9.0 with AMQP1.0 on Windows 7 Entreprise.
The clients run on Linux mint 17.3.





--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648644.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 dispatch router issue

Posted by Gordon Sim <gs...@redhat.com>.
On 03/08/16 13:45, eric73 wrote:
> Thank Ted.
> I set "standalone" mode for the router configuration.
> But now the dispatch router seems have problem when it try to connect to the
> broker.
> Indefinitely, there is a timeout error after connection: "local-idle-timeout
> expired".

What broker are you using, and what version?


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


Re: Qpid dispatch router issue

Posted by eric73 <er...@eaton.com>.
Thank Ted.
I set "standalone" mode for the router configuration.
But now the dispatch router seems have problem when it try to connect to the
broker.
Indefinitely, there is a timeout error after connection: "local-idle-timeout
expired".
Here is the dispatch router log:
...

...

Regards



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648633.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 dispatch router issue

Posted by Ted Ross <tr...@redhat.com>.
Eric,

Edge mode is not supported in 0.6.  You should just use "standalone" for 
a single router.

-Ted

On 08/02/2016 10:56 AM, eric73 wrote:
> Hello Ted,
> Thank you for your reply.
> In the second test which I described, I use qpid-dispatch 0.6.0 and it
> didn't work...
>
> Here is my  qdrouterd.conf file :
> ------------------------------------------------------------------------------------------
> ...
>
> container {
>     workerThreads: 4
>     containerName: Qpid.Dispatch.Router.A
>     debugDump: /home/eric/Bureau/qpid-test/logs/container.log
> }
>
> log {
>     module: DEFAULT
>     enable: trace,debug
>     output: /home/eric/Bureau/qpid-test/logs/qpid.log
> }
>
> listener {
>     addr: 0.0.0.0
>     port: amqp
>     authenticatePeer: no
> }
>
> router {
>     mode: edge
>     routerId: Router.Test
> }
>
> connector {
>     name: activemq-broker
>     role: on-demand
>     addr: XX.XX.XX.XX                        <-- @ of the broker
>     port: 5672
>     sasl-mechanisms: ANONYMOUS
>     allowRedirect: false
> }
>
> linkRoutePattern {
>     prefix: test_queue
>     connector: activemq-broker
> }
>
> linkRoutePattern {
>     prefix: test_topic
>     connector: activemq-broker
> }
>
> ...
> ----------------------------------------------------------------
> Thanks
> Regards
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648543.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
>

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


Re: Qpid dispatch router issue

Posted by eric73 <er...@eaton.com>.
Hello Ted,
Thank you for your reply.
In the second test which I described, I use qpid-dispatch 0.6.0 and it
didn't work...

Here is my  qdrouterd.conf file :
------------------------------------------------------------------------------------------
...

container {
    workerThreads: 4
    containerName: Qpid.Dispatch.Router.A
    debugDump: /home/eric/Bureau/qpid-test/logs/container.log
}

log {
    module: DEFAULT
    enable: trace,debug
    output: /home/eric/Bureau/qpid-test/logs/qpid.log
}

listener {
    addr: 0.0.0.0
    port: amqp
    authenticatePeer: no
}

router {
    mode: edge
    routerId: Router.Test
}

connector {
    name: activemq-broker
    role: on-demand
    addr: XX.XX.XX.XX                        <-- @ of the broker
    port: 5672
    sasl-mechanisms: ANONYMOUS
    allowRedirect: false
}

linkRoutePattern {
    prefix: test_queue
    connector: activemq-broker
}

linkRoutePattern {
    prefix: test_topic
    connector: activemq-broker
}

...
----------------------------------------------------------------
Thanks
Regards



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428p7648543.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 dispatch router issue

Posted by Ted Ross <tr...@redhat.com>.
If you are using brokers _and_ routers together, you should be using 
qpid-dispatch 0.6.0 or later.

There is some configuration needed on the router to make it integrate 
with a broker.  What is in your qdrouterd.conf file?

-Ted

On 08/01/2016 08:34 AM, eric73 wrote:
> Hi all,
>
> I\u2019m  working on a C++ project developed with Qpid libraries on Linux.
> I try to use the Qpid C++ messaging API (AMQP 1.0 protocol) with the
> dispatch router but I have several issues.
> First, I use the latest PPA packages available for my distribution (Linux
> mint 17.3 based on Ubuntu 14.04):
> -qpid-proton: 0.11.1-2
> -qpid-cpp: 0.34-2
> -qpid dispatch: 0.5-4
> I make two programs with Qpid C++ messaging API, one which send messages to
> a remote broker (ActiveMQ with AMQP 1.0 protocol) and another one (running
> on the same machine) which receive these messages.
> The programs work correctly when the connection is direct with the remote
> broker.
> I use a queue (\u201ctest_queue\u201d) and a topic ("'topic://test_topic'" -> double
> quotes are necessary for topic) for the test.
> But if a use the dispatch router, it works only when I address a queue on
> the broker but it doesn't works when I address a topic on the broker.
> In all case, I use only anonymous connection with the broker.
>
> Then, I update the libraries with the latest version available (make
> complete compilation on the same Linux mint distribution).
> -qpid-proton: 0.13.1
> -qpid-cpp: 0.34
> -qpid dispatch: 0.60
> Without the dispatch router, the programs work correctly.
> With the dispatch router, the same programs not work in all case when I
> address a queue or a topic on the broker.
> I have this error on the log of the dispatcher each time I try to send or
> receive a message :
> \u201cCONTAINER (notice) Aborting link
> 'test_queue_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' due to parent session
> end.\u201d
>
> Any help will be appreciate
> Thanks
> Regards
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-router-issue-tp7648428.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
>

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