As I understand it, federation isn't concerned with the details of the
underlying network connection as that's abstracted away in the code-base.
Therefore, I don't think it's really a question of whether or not
federation itself supports HTTP. The question is more about whether or not
you've configured the connectors and acceptors properly for HTTP, and I
don't believe you have. I think you've got 2 problems.

First, you're not telling the *connector* to use HTTP. Try this on broker 1:

   <connectors>
      <connector
name="eu-west-1-connector">tcp://broker2Hostname:80?httpEnabled=true</connector>
   </connectors>

And this on broker 2:

   <connectors>
      <connector
name="eu-east-1-connector">tcp://broker1Hostname:80?httpEnabled=true</connector>
   </connectors>

Second, you're binding the acceptor to "localhost" which means only clients
running on the same box will be able to connect to it. Try this on broker 1:

   <acceptors>
      <acceptor name="netty-acceptor">tcp://broker1Hostname:80</acceptor>
   </acceptors>

And this on broker 2:

   <acceptors>
      <acceptor name="netty-acceptor">tcp://broker2Hostname:80</acceptor>
   </acceptors>

I don't think you'll need "httpEnabled=true" on the acceptors as they
should automatically detect the use of HTTP (as noted in the documentation).


Justin

On Fri, Feb 28, 2020 at 5:32 PM sateesh kumar kapu <sateeshk...@gmail.com>
wrote:

> I am trying out federation example that is involving brokers on different
> machines. I am able to establish connection using core protocols via TCP
> however not able to make same thing with HTTP protocol.
>
> According to documentation it is mentioned that broker identifies the HTTP
> request and handles automatically but it does't seem to work.
>
> I have the environment as below
>
>           Broker 1  --> Load balancer (accepts http request on port 80) --
> broker 2
>
> How do we configure Connector and Acceptor to handle HTTP requests ? I
> tried
> with multiple combinations but couldn't succeed
>
> Broker 1
> ..
>    <connectors>
>          <connector
> name="eu-west-1-connector">tcp://broker2Hostname:80</connector>
>     </connectors>
>
>      <acceptors>
>          <acceptor
> name="netty-acceptor">tcp://localhost:80?httpEnabled=true</acceptor>
>       </acceptors>
> ..
>
> Broker 2
> ..
>    <connectors>
>          <connector
> name="eu-east-1-connector">tcp://broker1Hostname:80</connector>
>     </connectors>
>
>      <acceptors>
>          <acceptor
> name="netty-acceptor">tcp://localhost:80?httpEnabled=true</acceptor>
>       </acceptors>
> ..
>
> Basically I am looking for following questions
> 1) Does federation support HTTP protocol if so
> 2) How to configure the Connector and Acceptor for achieving same.
>
> Thanks in advance for response.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
>

Reply via email to