You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by wildpeanut <wi...@gmail.com> on 2019/06/24 09:26:47 UTC

how does HA config(backup-port-offset) work?

I read HA-related document and still can't figure out the config element
'backup-port-offset' meaning.

From the sentence in document, if the HA policy is colocated then connectors
and acceptors will be inherited from the live server creating it and offset
depending on the setting of backup-port-offset configuration element.

Why backup server need to do offset?

the document also said that if this is set to say 100 (which is the default)
and a connector is using port 61616 then this will be set to 5545 for the
first server created, 5645 for the second and so on.

Does that mean backup server 1 will create new listen port 5545 to live
server, and backup server 2 will create new listen port 5645?

I appreciate any comment which help me to clarify this mechanism. 



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: how does HA config(backup-port-offset) work?

Posted by Justin Bertram <jb...@apache.org>.
I already committed a fix [1].  :)


Justin

[1]
https://github.com/apache/activemq-artemis/commit/c8a6d0da95c21acb9c395ec7e98c9206bf47dc9a

On Mon, Jun 24, 2019 at 8:34 PM wildpeanut <wi...@gmail.com> wrote:

> Thanks a lot, I should post a typo issue or try to fix it. Could you tell
> me
> where to start?
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: how does HA config(backup-port-offset) work?

Posted by wildpeanut <wi...@gmail.com>.
Thanks a lot, I should post a typo issue or try to fix it. Could you tell me
where to start?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

RE: how does HA config(backup-port-offset) work?

Posted by BRONDY Denis <de...@thalesaleniaspace.com>.

[@@ THALES ALENIA SPACE INTERNAL @@]

-----Message d'origine-----
De : Justin Bertram [mailto:jbertram@apache.org] 
Envoyé : lundi 24 juin 2019 15:52
À : users@activemq.apache.org
Objet : Re: how does HA config(backup-port-offset) work?

> Why backup server need to do offset?

The offset is necessary to avoid port conflicts when starting the colocated backup. If both brokers try to use the same ports then one of the brokers won't work.

> Does that mean backup server 1 will create new listen port 5545 to 
> live
server, and backup server 2 will create new listen port 5645?

Yes. However, there's a typo in the documentation. It talks about a connector using port 61616 and then backups using 5545 and 5645 due to the port offset. However, it should say the backups will use 61716 and 61816 instead.


Justin

On Mon, Jun 24, 2019 at 8:41 AM wildpeanut <wi...@gmail.com> wrote:

> I read HA-related document and still can't figure out the config 
> element 'backup-port-offset' meaning.
>
> From the sentence in document, if the HA policy is colocated then 
> connectors and acceptors will be inherited from the live server 
> creating it and offset depending on the setting of backup-port-offset 
> configuration element.
>
> Why backup server need to do offset?
>
> the document also said that if this is set to say 100 (which is the
> default)
> and a connector is using port 61616 then this will be set to 5545 for 
> the first server created, 5645 for the second and so on.
>
> Does that mean backup server 1 will create new listen port 5545 to 
> live server, and backup server 2 will create new listen port 5645?
>
> I appreciate any comment which help me to clarify this mechanism.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: how does HA config(backup-port-offset) work?

Posted by Justin Bertram <jb...@apache.org>.
> Why backup server need to do offset?

The offset is necessary to avoid port conflicts when starting the colocated
backup. If both brokers try to use the same ports then one of the brokers
won't work.

> Does that mean backup server 1 will create new listen port 5545 to live
server, and backup server 2 will create new listen port 5645?

Yes. However, there's a typo in the documentation. It talks about a
connector using port 61616 and then backups using 5545 and 5645 due to the
port offset. However, it should say the backups will use 61716 and 61816
instead.


Justin

On Mon, Jun 24, 2019 at 8:41 AM wildpeanut <wi...@gmail.com> wrote:

> I read HA-related document and still can't figure out the config element
> 'backup-port-offset' meaning.
>
> From the sentence in document, if the HA policy is colocated then
> connectors
> and acceptors will be inherited from the live server creating it and offset
> depending on the setting of backup-port-offset configuration element.
>
> Why backup server need to do offset?
>
> the document also said that if this is set to say 100 (which is the
> default)
> and a connector is using port 61616 then this will be set to 5545 for the
> first server created, 5645 for the second and so on.
>
> Does that mean backup server 1 will create new listen port 5545 to live
> server, and backup server 2 will create new listen port 5645?
>
> I appreciate any comment which help me to clarify this mechanism.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>