You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Gunawan, Rahman (GSFC-SEWP)[Halvik Corp]" <ra...@nasa.gov.INVALID> on 2025/10/31 19:06:58 UTC

RE: [EXTERNAL] [BULK] Re: Anything wrong with the code?

I'm trying to connect to JGroup Artemis server group, but it seems remote connection is considered as 1 of the servers and trying to join the cluster.  Should I use direct broker url to connect e.g. connectionFactory = new ActiveMQConnectionFactory(connectionUrl, userName, password); where connectionUrl is a list of primary - backup servers?

Rahman Gunawan
SITSS Software Developer
NASA SEWP / SITSS
HALVIK Corporation 
7601 Ora Glen Dr, Greenbelt, MD 20770
C: 240.444.6003
O: 301.614.5257
rahman.gunawan@nasa.gov


-----Original Message-----
From: Justin Bertram <jb...@apache.org> 
Sent: Thursday, October 30, 2025 5:52 PM
To: users@activemq.apache.org
Subject: [EXTERNAL] [BULK] Re: Anything wrong with the code?

CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.




Before we go down the road of all the problems with this code, can you elaborate on your use-case? Why exactly are you trying to extend JGroupsFileBroadcastEndpointFactory?  Why not use the implementation that already exists? And ultimately what are you trying to do with it?

Please be thorough and clear. Your previous emails to this list have tended to lack clarity and meaningful follow-up which makes it difficult to assist.


Justin

On Thu, Oct 30, 2025 at 1:59 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp] <ra...@nasa.gov.invalid> wrote:

> Anything wrong with the code?  Why both 
> endpointFactory.getChannelName() and endpointFactory.getFile() is null?
>
> JGroupsFileBroadcastEndpointFactory endpointFactory = *new*
> *JGroupsFileBroadcastEndpointFactory()* {
>
>         @Override
>
>         *public* BroadcastEndpoint createBroadcastEndpoint() *throws* 
> Exception {
>
>             *System.out*.println("Creating JGroups File 
> BroadcastEndpoint...");
>
>
>
>             JGroupsFileBroadcastEndpoint endpoint = *new* 
> JGroupsFileBroadcastEndpoint(
>
>                     JChannelManager.*getInstance*(),
>
>                     "jgroups-file.xml",
>
>                     " jgroup_channel"
>
>             );
>
>
>
>             // Initialize the channel
>
>             endpoint.initChannel();
>
>             *System.out*.println("JGroups BroadcastEndpoint created 
> successfully");
>
>             *return* endpoint;
>
>         }
>
>     };
>
> *System.out*.println("Channel Name=" + 
> endpointFactory.getChannelName());
>
>     *System.out*.println("File=" + endpointFactory.getFile());
>
>
>
>
>
>
>
> *Rahman Gunawan*
>
> *SITSS Software Developer*
>
> NASA SEWP / SITSS
>
> HALV*I*K Corporation
>
> 7601 Ora Glen Dr, Greenbelt, MD 20770
>
> C: 240.444.6003
> O: 301.614.5257
>
> rahman.gunawan@nasa.gov
>
>
>
>
>

Re: [EXTERNAL] [BULK] Re: Anything wrong with the code?

Posted by Justin Bertram <jb...@apache.org>.
> I prefer to use JGroup from this client to discover the cluster nodes.

If that's the case then I recommend you use a "jgroups://" URL, e.g.:

  connectionFactory = new
ActiveMQConnectionFactory("jgroups://myChannelName?file=jgroups-file.xml,
userName, password);

The documentation [1] says this about jgroups://:

> the jgroups scheme is supported which provides an alternative to the udp
scheme for server discovery. The URL pattern is
jgroups://channelName?file=jgroups-xml-conf-filename where
jgroups-xml-conf-filename refers to an XML file on the classpath that
contains the JGroups configuration. The channelName is the name given to
the jgroups channel created.

Then you should be able to use the ConnectionFactory just like any other.
To be clear, the JGroups configuration in the XML on the client should
correspond to the broker's so that discovery will work.

It's worth noting that both the udp:// and jgroups:// URL schemes are not
often used since UDP multicast typically doesn't extend beyond a network
subnet which limits usability for remote clients.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/using-jms.html#connectionfactory-jndi

On Fri, Oct 31, 2025 at 3:09 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp]
<ra...@nasa.gov.invalid> wrote:

> I prefer to use JGroup from this client to discover the cluster nodes.
>
> Rahman Gunawan
> SITSS Software Developer
> NASA SEWP / SITSS
> HALVIK Corporation
> 7601 Ora Glen Dr, Greenbelt, MD 20770
> C: 240.444.6003
> O: 301.614.5257
> rahman.gunawan@nasa.gov
>
>
> -----Original Message-----
> From: Justin Bertram <jb...@apache.org>
> Sent: Friday, October 31, 2025 3:30 PM
> To: users@activemq.apache.org
> Subject: Re: [EXTERNAL] [BULK] Re: Anything wrong with the code?
>
> CAUTION: This email originated from outside of NASA.  Please take care
> when clicking links or opening attachments.  Use the "Report Message"
> button to report suspicious messages to the NASA SOC.
>
>
>
>
> So you have a cluster of brokers using JGroups for discovery, and you want
> your remote client to connect to one of the brokers in the cluster? If so,
> do you need to use JGroups from this client to discover the cluster nodes
> or do you already know their location?
>
>
> Justin
>
> On Fri, Oct 31, 2025 at 2:07 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp] <
> rahman.gunawan@nasa.gov.invalid> wrote:
>
> > I'm trying to connect to JGroup Artemis server group, but it seems
> > remote connection is considered as 1 of the servers and trying to join
> > the cluster.  Should I use direct broker url to connect e.g.
> > connectionFactory = new ActiveMQConnectionFactory(connectionUrl,
> > userName, password); where connectionUrl is a list of primary - backup
> servers?
> >
> > Rahman Gunawan
> > SITSS Software Developer
> > NASA SEWP / SITSS
> > HALVIK Corporation
> > 7601 Ora Glen Dr, Greenbelt, MD 20770
> > C: 240.444.6003
> > O: 301.614.5257
> > rahman.gunawan@nasa.gov
> >
> >
> > -----Original Message-----
> > From: Justin Bertram <jb...@apache.org>
> > Sent: Thursday, October 30, 2025 5:52 PM
> > To: users@activemq.apache.org
> > Subject: [EXTERNAL] [BULK] Re: Anything wrong with the code?
> >
> > CAUTION: This email originated from outside of NASA.  Please take care
> > when clicking links or opening attachments.  Use the "Report Message"
> > button to report suspicious messages to the NASA SOC.
> >
> >
> >
> >
> > Before we go down the road of all the problems with this code, can you
> > elaborate on your use-case? Why exactly are you trying to extend
> > JGroupsFileBroadcastEndpointFactory?  Why not use the implementation
> > that already exists? And ultimately what are you trying to do with it?
> >
> > Please be thorough and clear. Your previous emails to this list have
> > tended to lack clarity and meaningful follow-up which makes it
> > difficult to assist.
> >
> >
> > Justin
> >
> > On Thu, Oct 30, 2025 at 1:59 PM Gunawan, Rahman (GSFC-SEWP)[Halvik
> > Corp] < rahman.gunawan@nasa.gov.invalid> wrote:
> >
> > > Anything wrong with the code?  Why both
> > > endpointFactory.getChannelName() and endpointFactory.getFile() is null?
> > >
> > > JGroupsFileBroadcastEndpointFactory endpointFactory = *new*
> > > *JGroupsFileBroadcastEndpointFactory()* {
> > >
> > >         @Override
> > >
> > >         *public* BroadcastEndpoint createBroadcastEndpoint()
> > > *throws* Exception {
> > >
> > >             *System.out*.println("Creating JGroups File
> > > BroadcastEndpoint...");
> > >
> > >
> > >
> > >             JGroupsFileBroadcastEndpoint endpoint = *new*
> > > JGroupsFileBroadcastEndpoint(
> > >
> > >                     JChannelManager.*getInstance*(),
> > >
> > >                     "jgroups-file.xml",
> > >
> > >                     " jgroup_channel"
> > >
> > >             );
> > >
> > >
> > >
> > >             // Initialize the channel
> > >
> > >             endpoint.initChannel();
> > >
> > >             *System.out*.println("JGroups BroadcastEndpoint created
> > > successfully");
> > >
> > >             *return* endpoint;
> > >
> > >         }
> > >
> > >     };
> > >
> > > *System.out*.println("Channel Name=" +
> > > endpointFactory.getChannelName());
> > >
> > >     *System.out*.println("File=" + endpointFactory.getFile());
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > *Rahman Gunawan*
> > >
> > > *SITSS Software Developer*
> > >
> > > NASA SEWP / SITSS
> > >
> > > HALV*I*K Corporation
> > >
> > > 7601 Ora Glen Dr, Greenbelt, MD 20770
> > >
> > > C: 240.444.6003
> > > O: 301.614.5257
> > >
> > > rahman.gunawan@nasa.gov
> > >
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
> > For additional commands, e-mail: users-help@activemq.apache.org For
> > further information, visit:
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Facti
> > vemq.apache.org%2Fcontact&data=05%7C02%7Crahman.gunawan%40nasa.gov%7Cb
> > 10f078bb7d94fa9ee3708de18b44274%7C7005d45845be48ae8140d43da96dd17b%7C0
> > %7C0%7C638975359655561504%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy
> > dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%
> > 3D%7C0%7C%7C%7C&sdata=RJ%2BiGSbJb4lFg7y0kaPv2yaM39h3YmLshm0B9QHj6aU%3D
> > &reserved=0
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
> For additional commands, e-mail: users-help@activemq.apache.org
> For further information, visit: https://activemq.apache.org/contact
>
>

RE: [EXTERNAL] [BULK] Re: Anything wrong with the code?

Posted by "Gunawan, Rahman (GSFC-SEWP)[Halvik Corp]" <ra...@nasa.gov.INVALID>.
I prefer to use JGroup from this client to discover the cluster nodes.

Rahman Gunawan
SITSS Software Developer
NASA SEWP / SITSS
HALVIK Corporation 
7601 Ora Glen Dr, Greenbelt, MD 20770
C: 240.444.6003
O: 301.614.5257
rahman.gunawan@nasa.gov


-----Original Message-----
From: Justin Bertram <jb...@apache.org> 
Sent: Friday, October 31, 2025 3:30 PM
To: users@activemq.apache.org
Subject: Re: [EXTERNAL] [BULK] Re: Anything wrong with the code?

CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.




So you have a cluster of brokers using JGroups for discovery, and you want your remote client to connect to one of the brokers in the cluster? If so, do you need to use JGroups from this client to discover the cluster nodes or do you already know their location?


Justin

On Fri, Oct 31, 2025 at 2:07 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp] <ra...@nasa.gov.invalid> wrote:

> I'm trying to connect to JGroup Artemis server group, but it seems 
> remote connection is considered as 1 of the servers and trying to join 
> the cluster.  Should I use direct broker url to connect e.g. 
> connectionFactory = new ActiveMQConnectionFactory(connectionUrl, 
> userName, password); where connectionUrl is a list of primary - backup servers?
>
> Rahman Gunawan
> SITSS Software Developer
> NASA SEWP / SITSS
> HALVIK Corporation
> 7601 Ora Glen Dr, Greenbelt, MD 20770
> C: 240.444.6003
> O: 301.614.5257
> rahman.gunawan@nasa.gov
>
>
> -----Original Message-----
> From: Justin Bertram <jb...@apache.org>
> Sent: Thursday, October 30, 2025 5:52 PM
> To: users@activemq.apache.org
> Subject: [EXTERNAL] [BULK] Re: Anything wrong with the code?
>
> CAUTION: This email originated from outside of NASA.  Please take care 
> when clicking links or opening attachments.  Use the "Report Message"
> button to report suspicious messages to the NASA SOC.
>
>
>
>
> Before we go down the road of all the problems with this code, can you 
> elaborate on your use-case? Why exactly are you trying to extend 
> JGroupsFileBroadcastEndpointFactory?  Why not use the implementation 
> that already exists? And ultimately what are you trying to do with it?
>
> Please be thorough and clear. Your previous emails to this list have 
> tended to lack clarity and meaningful follow-up which makes it 
> difficult to assist.
>
>
> Justin
>
> On Thu, Oct 30, 2025 at 1:59 PM Gunawan, Rahman (GSFC-SEWP)[Halvik 
> Corp] < rahman.gunawan@nasa.gov.invalid> wrote:
>
> > Anything wrong with the code?  Why both
> > endpointFactory.getChannelName() and endpointFactory.getFile() is null?
> >
> > JGroupsFileBroadcastEndpointFactory endpointFactory = *new*
> > *JGroupsFileBroadcastEndpointFactory()* {
> >
> >         @Override
> >
> >         *public* BroadcastEndpoint createBroadcastEndpoint() 
> > *throws* Exception {
> >
> >             *System.out*.println("Creating JGroups File 
> > BroadcastEndpoint...");
> >
> >
> >
> >             JGroupsFileBroadcastEndpoint endpoint = *new* 
> > JGroupsFileBroadcastEndpoint(
> >
> >                     JChannelManager.*getInstance*(),
> >
> >                     "jgroups-file.xml",
> >
> >                     " jgroup_channel"
> >
> >             );
> >
> >
> >
> >             // Initialize the channel
> >
> >             endpoint.initChannel();
> >
> >             *System.out*.println("JGroups BroadcastEndpoint created 
> > successfully");
> >
> >             *return* endpoint;
> >
> >         }
> >
> >     };
> >
> > *System.out*.println("Channel Name=" + 
> > endpointFactory.getChannelName());
> >
> >     *System.out*.println("File=" + endpointFactory.getFile());
> >
> >
> >
> >
> >
> >
> >
> > *Rahman Gunawan*
> >
> > *SITSS Software Developer*
> >
> > NASA SEWP / SITSS
> >
> > HALV*I*K Corporation
> >
> > 7601 Ora Glen Dr, Greenbelt, MD 20770
> >
> > C: 240.444.6003
> > O: 301.614.5257
> >
> > rahman.gunawan@nasa.gov
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
> For additional commands, e-mail: users-help@activemq.apache.org For 
> further information, visit: 
> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Facti
> vemq.apache.org%2Fcontact&data=05%7C02%7Crahman.gunawan%40nasa.gov%7Cb
> 10f078bb7d94fa9ee3708de18b44274%7C7005d45845be48ae8140d43da96dd17b%7C0
> %7C0%7C638975359655561504%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy
> dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%
> 3D%7C0%7C%7C%7C&sdata=RJ%2BiGSbJb4lFg7y0kaPv2yaM39h3YmLshm0B9QHj6aU%3D
> &reserved=0
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
For additional commands, e-mail: users-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [EXTERNAL] [BULK] Re: Anything wrong with the code?

Posted by Justin Bertram <jb...@apache.org>.
So you have a cluster of brokers using JGroups for discovery, and you want
your remote client to connect to one of the brokers in the cluster? If so,
do you need to use JGroups from this client to discover the cluster nodes
or do you already know their location?


Justin

On Fri, Oct 31, 2025 at 2:07 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp]
<ra...@nasa.gov.invalid> wrote:

> I'm trying to connect to JGroup Artemis server group, but it seems remote
> connection is considered as 1 of the servers and trying to join the
> cluster.  Should I use direct broker url to connect e.g. connectionFactory
> = new ActiveMQConnectionFactory(connectionUrl, userName, password); where
> connectionUrl is a list of primary - backup servers?
>
> Rahman Gunawan
> SITSS Software Developer
> NASA SEWP / SITSS
> HALVIK Corporation
> 7601 Ora Glen Dr, Greenbelt, MD 20770
> C: 240.444.6003
> O: 301.614.5257
> rahman.gunawan@nasa.gov
>
>
> -----Original Message-----
> From: Justin Bertram <jb...@apache.org>
> Sent: Thursday, October 30, 2025 5:52 PM
> To: users@activemq.apache.org
> Subject: [EXTERNAL] [BULK] Re: Anything wrong with the code?
>
> CAUTION: This email originated from outside of NASA.  Please take care
> when clicking links or opening attachments.  Use the "Report Message"
> button to report suspicious messages to the NASA SOC.
>
>
>
>
> Before we go down the road of all the problems with this code, can you
> elaborate on your use-case? Why exactly are you trying to extend
> JGroupsFileBroadcastEndpointFactory?  Why not use the implementation that
> already exists? And ultimately what are you trying to do with it?
>
> Please be thorough and clear. Your previous emails to this list have
> tended to lack clarity and meaningful follow-up which makes it difficult to
> assist.
>
>
> Justin
>
> On Thu, Oct 30, 2025 at 1:59 PM Gunawan, Rahman (GSFC-SEWP)[Halvik Corp] <
> rahman.gunawan@nasa.gov.invalid> wrote:
>
> > Anything wrong with the code?  Why both
> > endpointFactory.getChannelName() and endpointFactory.getFile() is null?
> >
> > JGroupsFileBroadcastEndpointFactory endpointFactory = *new*
> > *JGroupsFileBroadcastEndpointFactory()* {
> >
> >         @Override
> >
> >         *public* BroadcastEndpoint createBroadcastEndpoint() *throws*
> > Exception {
> >
> >             *System.out*.println("Creating JGroups File
> > BroadcastEndpoint...");
> >
> >
> >
> >             JGroupsFileBroadcastEndpoint endpoint = *new*
> > JGroupsFileBroadcastEndpoint(
> >
> >                     JChannelManager.*getInstance*(),
> >
> >                     "jgroups-file.xml",
> >
> >                     " jgroup_channel"
> >
> >             );
> >
> >
> >
> >             // Initialize the channel
> >
> >             endpoint.initChannel();
> >
> >             *System.out*.println("JGroups BroadcastEndpoint created
> > successfully");
> >
> >             *return* endpoint;
> >
> >         }
> >
> >     };
> >
> > *System.out*.println("Channel Name=" +
> > endpointFactory.getChannelName());
> >
> >     *System.out*.println("File=" + endpointFactory.getFile());
> >
> >
> >
> >
> >
> >
> >
> > *Rahman Gunawan*
> >
> > *SITSS Software Developer*
> >
> > NASA SEWP / SITSS
> >
> > HALV*I*K Corporation
> >
> > 7601 Ora Glen Dr, Greenbelt, MD 20770
> >
> > C: 240.444.6003
> > O: 301.614.5257
> >
> > rahman.gunawan@nasa.gov
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@activemq.apache.org
> For additional commands, e-mail: users-help@activemq.apache.org
> For further information, visit: https://activemq.apache.org/contact
>
>