You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Bijju Patel <bp...@gmail.com> on 2021/01/20 15:03:56 UTC

Client connection setting to use a particular nic interface and ip address

Hi,
The client system from where I am connecting to the broker, has 2 NIC cards
and hence configured with 2 ip addresses.
When I make a connection to broker, I want to make the connection using a
particular IP address (and hence using a particular nic)
ie the client system has 10.1.10.10 and 10.1.10.20 addresses configured on
2 NICs, I want the client to make the
    connection using 10.1.10.20 always.
Is it possible to specify this in the url for client connection?
(I don't want to change any underlying kernel settings for socket creation
etc.)
I am not finding any info for this in the documentation or maybe I am not
looking at correct location. Our setup is ActiveMQ Classic setup.

Wondering if anyone has used this type of setting; if yes, let me know how
or what property I need to specify in the connection url.
Really appreciate any pointers or reference to the doc where I can get this
info.

Thanks in advance.

Bijju Patel.

Re: Client connection setting to use a particular nic interface and ip address

Posted by Matt Pavlovich <ma...@gmail.com>.
When you configure the transportConnector on the ActiveMQ Server, set the url to use the IP you want, not the listen-on-all-IPs placeholder “0.0.0.0"

> On Jan 20, 2021, at 9:03 AM, Bijju Patel <bp...@gmail.com> wrote:
> 
> Hi,
> The client system from where I am connecting to the broker, has 2 NIC cards
> and hence configured with 2 ip addresses.
> When I make a connection to broker, I want to make the connection using a
> particular IP address (and hence using a particular nic)
> ie the client system has 10.1.10.10 and 10.1.10.20 addresses configured on
> 2 NICs, I want the client to make the
>    connection using 10.1.10.20 always.
> Is it possible to specify this in the url for client connection?
> (I don't want to change any underlying kernel settings for socket creation
> etc.)
> I am not finding any info for this in the documentation or maybe I am not
> looking at correct location. Our setup is ActiveMQ Classic setup.
> 
> Wondering if anyone has used this type of setting; if yes, let me know how
> or what property I need to specify in the connection url.
> Really appreciate any pointers or reference to the doc where I can get this
> info.
> 
> Thanks in advance.
> 
> Bijju Patel.


RE: Client connection setting to use a particular nic interface and ip address

Posted by Sridhar Ayengar <sk...@mmm.com.INVALID>.
Hi Bijju.

You could set up a static route for the target server.  To be able to specify more exactly, I'd need to know more about the client.  What platform, and what your IP configuration and route tables look like.

Peace...  Sridhar

> -----Original Message-----
> From: Bijju Patel <bp...@gmail.com>
> Sent: Wednesday, January 20, 2021 10:04 AM
> To: users@activemq.apache.org
> Subject: [EXTERNAL] Client connection setting to use a particular nic interface
> and ip address
> 
> Hi,
> The client system from where I am connecting to the broker, has 2 NIC cards
> and hence configured with 2 ip addresses.
> When I make a connection to broker, I want to make the connection using a
> particular IP address (and hence using a particular nic) ie the client system has
> 10.1.10.10 and 10.1.10.20 addresses configured on
> 2 NICs, I want the client to make the
>     connection using 10.1.10.20 always.
> Is it possible to specify this in the url for client connection?
> (I don't want to change any underlying kernel settings for socket creation
> etc.)
> I am not finding any info for this in the documentation or maybe I am not
> looking at correct location. Our setup is ActiveMQ Classic setup.
> 
> Wondering if anyone has used this type of setting; if yes, let me know how or
> what property I need to specify in the connection url.
> Really appreciate any pointers or reference to the doc where I can get this info.
> 
> Thanks in advance.
> 
> Bijju Patel.