You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "ヤ艾枫o.--" <11...@qq.com> on 2021/03/24 14:33:54 UTC

回复: I have some question when i connet activemq artemis with ha mode using spring boot。

Hi
&nbsp; &nbsp;i have try it using&nbsp; spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616).ie in application.properties.
&nbsp; spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616)
&nbsp; spring.artemis.user=admin
&nbsp; spring.artemis.password=password
&nbsp; spring.artemis.embedded.cluster-password=password
but it does not work.and can not connect the service.


when i user spring boot to connect activemq artemis cluster ,Added dependencies about activemq artemis is


<dependency&gt;
&nbsp; <groupId&gt;org.springframwork.boot</groupId&gt;
&nbsp; <artifactId&gt;spring-boot-starter-artemis</artifactId&gt;&nbsp;
&nbsp; <version&gt;2.0.5.RELEASE</version&gt;
</dependency&gt;
i have no idea about wheather i forget the depenencies.&nbsp;


i do not have idea to find the reson why i con not connect the cluster ,










------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "users"                                                                                    <bruscinodf@gmail.com&gt;;
发送时间:&nbsp;2021年3月24日(星期三) 晚上9:57
收件人:&nbsp;"users"<users@activemq.apache.org&gt;;

主题:&nbsp;Re: I have some question when i connet activemq artemis with ha mode using spring boot。



Hi,

you can use `brokerUrl` property to set more than one server,
ie: spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616)

Regards,
Domenico

On Wed, 24 Mar 2021 at 14:06, ヤ艾枫o.-- <1169114186@qq.com&gt; wrote:

&gt; hello:
&gt; I have some question when i connet activemq artemis with ha mode using
&gt; spring boot。
&gt; &amp;nbsp; &amp;nbsp; According to you doc. when the activemq artemis mode is one.
&gt; I can use spring boot's configuration to connect service.eg:
&gt; &amp;nbsp; &amp;nbsp; spring.artemis.host=
&gt; &amp;nbsp; &amp;nbsp; spring.artemis.port=
&gt; &amp;nbsp; &amp;nbsp; spring.artemis.user=
&gt; &amp;nbsp; &amp;nbsp;........
&gt; &amp;nbsp; &amp;nbsp;but,when the mode is ha or cluster,and the node is more than
&gt; one, if i want to use spring boot to conect the cluster,what should i do.
&gt; &amp;nbsp; &amp;nbsp;i can not find any configuration about cluster when use
&gt; spring boot ,can you help me
&gt; &amp;nbsp; ,I am looking forward to hearing from you
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; thanks:
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yours pengshuai

Re: I have some question when i connet activemq artemis with ha mode using spring boot。

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi,

the `brokerUrl` property was added since v2.5.0-M1 and AFAIK it is the only
way to set more than one server.

Regards,
Domenico

On Wed, 24 Mar 2021 at 15:34, ヤ艾枫o.-- <11...@qq.com> wrote:

> Hi
> &nbsp; &nbsp;i have try it using&nbsp;
> spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616).ie in
> application.properties.
> &nbsp; spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616)
> &nbsp; spring.artemis.user=admin
> &nbsp; spring.artemis.password=password
> &nbsp; spring.artemis.embedded.cluster-password=password
> but it does not work.and can not connect the service.
>
>
> when i user spring boot to connect activemq artemis cluster ,Added
> dependencies about activemq artemis is
>
>
> <dependency&gt;
> &nbsp; <groupId&gt;org.springframwork.boot</groupId&gt;
> &nbsp; <artifactId&gt;spring-boot-starter-artemis</artifactId&gt;&nbsp;
> &nbsp; <version&gt;2.0.5.RELEASE</version&gt;
> </dependency&gt;
> i have no idea about wheather i forget the depenencies.&nbsp;
>
>
> i do not have idea to find the reson why i con not connect the cluster ,
>
>
>
>
>
>
>
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "users"
>                                                                   <
> bruscinodf@gmail.com&gt;;
> 发送时间:&nbsp;2021年3月24日(星期三) 晚上9:57
> 收件人:&nbsp;"users"<users@activemq.apache.org&gt;;
>
> 主题:&nbsp;Re: I have some question when i connet activemq artemis with ha
> mode using spring boot。
>
>
>
> Hi,
>
> you can use `brokerUrl` property to set more than one server,
> ie: spring.artemis.brokerUrl=(tcp://myhost:61616,tcp://myhost2:61616)
>
> Regards,
> Domenico
>
> On Wed, 24 Mar 2021 at 14:06, ヤ艾枫o.-- <1169114186@qq.com&gt; wrote:
>
> &gt; hello:
> &gt; I have some question when i connet activemq artemis with ha mode using
> &gt; spring boot。
> &gt; &amp;nbsp; &amp;nbsp; According to you doc. when the activemq artemis
> mode is one.
> &gt; I can use spring boot's configuration to connect service.eg:
> &gt; &amp;nbsp; &amp;nbsp; spring.artemis.host=
> &gt; &amp;nbsp; &amp;nbsp; spring.artemis.port=
> &gt; &amp;nbsp; &amp;nbsp; spring.artemis.user=
> &gt; &amp;nbsp; &amp;nbsp;........
> &gt; &amp;nbsp; &amp;nbsp;but,when the mode is ha or cluster,and the node
> is more than
> &gt; one, if i want to use spring boot to conect the cluster,what should i
> do.
> &gt; &amp;nbsp; &amp;nbsp;i can not find any configuration about cluster
> when use
> &gt; spring boot ,can you help me
> &gt; &amp;nbsp; ,I am looking forward to hearing from you
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> thanks:
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
> &amp;nbsp;yours pengshuai