You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chester <kn...@gmail.com> on 2017/04/19 20:07:58 UTC

qpid-cpp-client: ability to bind to particular network interface?

Hello,

I'm trying to determine if there is any way to set which network interface
is used by the cpp-client. I have a new use case of an application running
on a machine has multiple interfaces (eth0, eth1, etc.), only one of which
is appropriate for the connection. Is there any way to instruct the client
which interface/ip it should use? We're using qpid-cpp-client 1.36 on EL7.

Thanks,
Chester

Re: qpid-cpp-client: ability to bind to particular network interface?

Posted by Gordon Sim <gs...@redhat.com>.
On 24/04/17 18:47, Chester wrote:
> Hey Gordon,
>
> Thank you for the response. I think I must be reading something wrong here.
> Obviously, from
> https://qpid.apache.org/releases/qpid-0.32/programming/book/connections.html#connection-url,
> I can set the server address (the url used by the client to connect to the
> given broker address). Are you saying there is also a capability to set the
> client's address (the client's IP to use as the source when connecting to
> the broker's address)? If so, I must have overlooked this in the
> documentation or be misreading something. Example IPs to further illustrate
> the point:
>
> Client:                      Server (broker)
> eth0 10.1.1.1            eth0 10.2.1.1
> eth1 10.1.1.2
>
> Is there some connection string option which will ensure qpidd-cpp-client
> is only connecting over eth0 (10.1.1.1) instead of eth1 (10.1.1.2)?

No, sorry, I misunderstood. I thought it was the server that had 
multiple interfaces (and was a bit puzzled by the question!).

There is nothing in qpid::messaging that would let you choose the 
interface to use. I don't think there is anything at the socket level 
either tbh, I think you would need to alter the routing rules on the 
client machine.


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


Re: qpid-cpp-client: ability to bind to particular network interface?

Posted by Chester <kn...@gmail.com>.
Hey Gordon,

Thank you for the response. I think I must be reading something wrong here.
Obviously, from
https://qpid.apache.org/releases/qpid-0.32/programming/book/connections.html#connection-url,
I can set the server address (the url used by the client to connect to the
given broker address). Are you saying there is also a capability to set the
client's address (the client's IP to use as the source when connecting to
the broker's address)? If so, I must have overlooked this in the
documentation or be misreading something. Example IPs to further illustrate
the point:

Client:                      Server (broker)
eth0 10.1.1.1            eth0 10.2.1.1
eth1 10.1.1.2

Is there some connection string option which will ensure qpidd-cpp-client
is only connecting over eth0 (10.1.1.1) instead of eth1 (10.1.1.2)?

I would appreciate any pointer you may have for me for this case.

Thanks,
Chester

On Mon, Apr 24, 2017 at 1:07 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 19/04/17 21:07, Chester wrote:
>
>> Hello,
>>
>> I'm trying to determine if there is any way to set which network interface
>> is used by the cpp-client. I have a new use case of an application running
>> on a machine has multiple interfaces (eth0, eth1, etc.), only one of which
>> is appropriate for the connection. Is there any way to instruct the client
>> which interface/ip it should use? We're using qpid-cpp-client 1.36 on EL7.
>>
>
> Just use the ip in the 'url'/connection string?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: qpid-cpp-client: ability to bind to particular network interface?

Posted by Gordon Sim <gs...@redhat.com>.
On 19/04/17 21:07, Chester wrote:
> Hello,
>
> I'm trying to determine if there is any way to set which network interface
> is used by the cpp-client. I have a new use case of an application running
> on a machine has multiple interfaces (eth0, eth1, etc.), only one of which
> is appropriate for the connection. Is there any way to instruct the client
> which interface/ip it should use? We're using qpid-cpp-client 1.36 on EL7.

Just use the ip in the 'url'/connection string?


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