You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Bryan <br...@gmail.com> on 2011/03/03 04:37:36 UTC
TCP connection to broker from behind NAT
I have a fairly simple topology, where I have a client behind a NAT
connecting to a broker outside of the NAT, via a TCP connection. I do not
want to open or forward any ports in the NAT firewall. The client is both
sending and receiving messages (both a message producer and a consumer).
Can a client produce and consume messages over the single TCP connection to
the broker? Is there any circumstance where the broker will try to establish
a connection to the client (similar to FTP or RMI) when using a TCP
connection from the client? Does the broker machine only need to have the
single TCP port open?
I seem to be having connectivity issues implementing request-reply using
temp queues and correlation IDs, and I am hoping the broker isn't trying to
establish a connection with the client. Thanks in advance.
--
View this message in context: http://activemq.2283324.n4.nabble.com/TCP-connection-to-broker-from-behind-NAT-tp3332715p3332715.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: TCP connection to broker from behind NAT
Posted by Gary Tully <ga...@gmail.com>.
can you get request reply to work with a local broker?
There are two ports involved, the client port (usually dynamically
assigned, and the server or broker port (66167). You may have to open
up the client port on your firewall to allow packets from the broker
to get through to the client.
a client side broker url of the form: tcp://xxx:61610/xxx:61617 will
restrict the client side to port 61610 when it connects to 61617
http://activemq.apache.org/how-do-i-define-a-local-address-and-local-port-for-tcp-or-ssl.html
On 3 March 2011 22:15, Bryan <br...@gmail.com> wrote:
> One other thing I noticed. When I do not try to establish a reply queue, I do
> not see any messages about advisory queues being initialized. When I do
> create a temporary reply queue, however, I see messages about advisory
> queues, e.g. adding destination: topic://ActiveMQ.Advisory.TempQueue.
> Perhaps my issue is somehow related to advisory messages? I tried disabling
> advisory messages but this did not resolve my issue.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/TCP-connection-to-broker-from-behind-NAT-tp3332715p3334329.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
http://blog.garytully.com
http://fusesource.com
Re: TCP connection to broker from behind NAT
Posted by Bryan <br...@gmail.com>.
One other thing I noticed. When I do not try to establish a reply queue, I do
not see any messages about advisory queues being initialized. When I do
create a temporary reply queue, however, I see messages about advisory
queues, e.g. adding destination: topic://ActiveMQ.Advisory.TempQueue.
Perhaps my issue is somehow related to advisory messages? I tried disabling
advisory messages but this did not resolve my issue.
--
View this message in context: http://activemq.2283324.n4.nabble.com/TCP-connection-to-broker-from-behind-NAT-tp3332715p3334329.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: TCP connection to broker from behind NAT
Posted by Bryan <br...@gmail.com>.
So after doing some more digging, it seems I can connect to the broker from
behind a NAT fine. I can send messages to the broker machine, and the broker
machine can send messages to the client machine that is behind the NAT. This
can be done with a single outbound TCP transport connector from the client
to the broker.
The problem arises when I try to implement request-reply using a correlation
ID and a reply queue. I cannot seem to find any place where the broker tries
to make a connection to the client, and I am not getting any connectivity
exceptions, so I don't believe it is a connectivity problem.
Could it be related to the correlation ID?
--
View this message in context: http://activemq.2283324.n4.nabble.com/TCP-connection-to-broker-from-behind-NAT-tp3332715p3334324.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.