You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Marko Lazić <zi...@gmail.com> on 2023/03/09 10:04:26 UTC

Artemis - broker.xml configuration on Docker

Hello!


I’ve built Artemis 2.19.0 image from apache/activemq-artemis: Mirror of Apache ActiveMQ Artemis (github.com) <https://github.com/apache/activemq-artemis>. I have problem with configuring the broker.xml file on Docker. I want maybe to define some addresses, queues and change some address settings. My intuitive try was to mount a /var/lib/artemis-instance/etc/broker.xml but I've got an error on container startup that the artemis executable does not exist, as mounting prevents it from creating. The activemq-artemis/artemis-docker has a Mapping point section but it mentions that you can mount the whole instance via /var/lib/artemis-instance. I just want to change only few lines in the broker.xml file. Is there a way to to mount only my custom broker.xml file on startup?



Kind regards
Marko

Re: Artemis - broker.xml configuration on Docker

Posted by Marko Lazić <zi...@gmail.com>.
Hi Domenico and Robbie,


And thanks for the quick response. I will try applying things that I have been recommended. Unfortunately I already have seen that answer and I was not satisfied with it because /var/lib/artemis-instance seem to contain things that I don’t understand how they work, what they are and I do not feel comfortable maintaining all these files in my infrastructure code. But if thats the only way of configuring broker.xml it I will have to follow. It seems that it holds bins, datas, libs, locks, logs and temps. I am not used to checkout executable’s and such to git.


Kind regards,
Marko

> On 9. 3. 2023., at 11:18, Domenico Francesco Bruscino <br...@gmail.com> wrote:
> 
> Hi Marko,
> 
> the docker-run.sh doesn't create a new instance if the
> /var/lib/artemis-instance/etc/broker.xml file exists. This means that you
> need to provide a complete broker instance or to change the broker instance
> created by the artemis container.
> 
> I have already answered a similar question on stackoverflow, for further
> details see
> https://stackoverflow.com/questions/75493917/how-to-customize-the-broker-xml-file-in-the-standard-apache-activemq-artemis-doc/75495670#75495670
> 
> Regards,
> Domenico
> 
> On Thu, 9 Mar 2023 at 11:04, Marko Lazić <zi...@gmail.com> wrote:
> 
>> Hello!
>> 
>> 
>> I’ve built Artemis 2.19.0 image from apache/activemq-artemis: Mirror of
>> Apache ActiveMQ Artemis (github.com) <
>> https://github.com/apache/activemq-artemis>. I have problem with
>> configuring the broker.xml file on Docker. I want maybe to define some
>> addresses, queues and change some address settings. My intuitive try was to
>> mount a /var/lib/artemis-instance/etc/broker.xml but I've got an error on
>> container startup that the artemis executable does not exist, as mounting
>> prevents it from creating. The activemq-artemis/artemis-docker has a
>> Mapping point section but it mentions that you can mount the whole instance
>> via /var/lib/artemis-instance. I just want to change only few lines in the
>> broker.xml file. Is there a way to to mount only my custom broker.xml file
>> on startup?
>> 
>> 
>> 
>> Kind regards
>> Marko


Re: Artemis - broker.xml configuration on Docker

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

the docker-run.sh doesn't create a new instance if the
/var/lib/artemis-instance/etc/broker.xml file exists. This means that you
need to provide a complete broker instance or to change the broker instance
created by the artemis container.

I have already answered a similar question on stackoverflow, for further
details see
https://stackoverflow.com/questions/75493917/how-to-customize-the-broker-xml-file-in-the-standard-apache-activemq-artemis-doc/75495670#75495670

Regards,
Domenico

On Thu, 9 Mar 2023 at 11:04, Marko Lazić <zi...@gmail.com> wrote:

> Hello!
>
>
> I’ve built Artemis 2.19.0 image from apache/activemq-artemis: Mirror of
> Apache ActiveMQ Artemis (github.com) <
> https://github.com/apache/activemq-artemis>. I have problem with
> configuring the broker.xml file on Docker. I want maybe to define some
> addresses, queues and change some address settings. My intuitive try was to
> mount a /var/lib/artemis-instance/etc/broker.xml but I've got an error on
> container startup that the artemis executable does not exist, as mounting
> prevents it from creating. The activemq-artemis/artemis-docker has a
> Mapping point section but it mentions that you can mount the whole instance
> via /var/lib/artemis-instance. I just want to change only few lines in the
> broker.xml file. Is there a way to to mount only my custom broker.xml file
> on startup?
>
>
>
> Kind regards
> Marko

Re: Artemis - broker.xml configuration on Docker

Posted by Robbie Gemmell <ro...@gmail.com>.
Tangential note that 2.19.0 is old at this point, and isnt even the
latest 2.19.x given that 2.19.1 was later released to backport some
stuff from 2.20.0 and 2.21.0. The current release is 2.28.0.

On Thu, 9 Mar 2023 at 10:04, Marko Lazić <zi...@gmail.com> wrote:
>
> Hello!
>
>
> I’ve built Artemis 2.19.0 image from apache/activemq-artemis: Mirror of Apache ActiveMQ Artemis (github.com) <https://github.com/apache/activemq-artemis>. I have problem with configuring the broker.xml file on Docker. I want maybe to define some addresses, queues and change some address settings. My intuitive try was to mount a /var/lib/artemis-instance/etc/broker.xml but I've got an error on container startup that the artemis executable does not exist, as mounting prevents it from creating. The activemq-artemis/artemis-docker has a Mapping point section but it mentions that you can mount the whole instance via /var/lib/artemis-instance. I just want to change only few lines in the broker.xml file. Is there a way to to mount only my custom broker.xml file on startup?
>
>
>
> Kind regards
> Marko

RE: Artemis - broker.xml configuration on Docker

Posted by Vilius Šumskas <vi...@rivile.lt>.
Hi,

depending on what you need to change, you could probably use 'bin/artemis create' to generate correct broker.xml in the first place. This is what docker-run.sh script with EXTRA_ARGS does.
Check available options at https://activemq.apache.org/components/artemis/documentation/latest/using-server.html#creating-a-broker-instance

-- 
    Vilius

-----Original Message-----
From: Marko Lazić <zi...@gmail.com> 
Sent: Thursday, March 9, 2023 12:04 PM
To: users@activemq.apache.org
Subject: Artemis - broker.xml configuration on Docker

Hello!


I’ve built Artemis 2.19.0 image from apache/activemq-artemis: Mirror of Apache ActiveMQ Artemis (github.com) <https://github.com/apache/activemq-artemis>. I have problem with configuring the broker.xml file on Docker. I want maybe to define some addresses, queues and change some address settings. My intuitive try was to mount a /var/lib/artemis-instance/etc/broker.xml but I've got an error on container startup that the artemis executable does not exist, as mounting prevents it from creating. The activemq-artemis/artemis-docker has a Mapping point section but it mentions that you can mount the whole instance via /var/lib/artemis-instance. I just want to change only few lines in the broker.xml file. Is there a way to to mount only my custom broker.xml file on startup?



Kind regards
Marko