Re: PowerShell and STOMP Support

2024-02-19 Thread Simon Lundström
We have successfully used https://activemq.apache.org/components/nms/
(and what I'm guessing is Apache.NMS.ActiveMQ) from PowerShell. You
could use Apache.NMS.AMQP (and thus towards Artemis) as well but we have
no experience in this.

BR,
- Simon

On Fri, 2024-02-16 at 21:21:35 +0100, Justin Bertram wrote:
> I'm sure there are STOMP and/or AMQP clients out there which you can use
> from PowerShell to send messages. However, ActiveMQ itself doesn't provide
> such clients.
> 
> I recommend you check out stomp.py [1]. I know it supports the ability to
> send messages from the command-line so you should be able to integrate it
> into your PowerShell script. If its command-line support doesn't suit your
> needs I'm sure it would be simple to write your own Python script and use
> its full-featured client API to do exactly what you want.
> 
> 
> Justin
> 
> [1] https://github.com/jasonrbriggs/stomp.py
> 
> On Mon, Feb 12, 2024 at 2:37 AM Shiv Kumar Dixit
>  wrote:
> 
> > Hi,
> > I am exploring a way to securely (TLS) send/receive message to Artemis
> > broker via PowerShell. Previously I tried configuring REST interface, but
> > it was updated in community ticket that REST interface is now
> > decommissioned, and STOMP protocol is expected to cover all the use cases
> > intended for REST interface.
> >
> > If there is any example or KB available to use STOMP and PowerShell
> > together which I can refer? Currently I don't see any PowerShell script
> > sample included with Artemis distribution.
> >
> > Thanks
> > Shiv
> >
> >


RE: PowerShell and STOMP Support

2024-02-17 Thread MILOVIDOV Aleksandr
Hi Shiv,

It is possible to send message with custom headers using "a" utility: 
https://github.com/fmtn/a

I have been programming powershell scripts several years ago. The easiest way 
to send a message from script is to call external program which can work with 
ActiveMQ. It will work very slow because it needs to execute program which 
connects to message broker, authenticates, creates session, etc. - for each 
message.
Hypothetically there can be some other ways, for example using Apache NMS 
library for .NET and working with corresponding .NET classes. I don't know if 
it is possible, and it would require more programming skills and depends on 
versions of Powershell and .NET.
Writing the same script in Python could be better choice because Python has at 
least STOMP support.


--
Best regards,
Aleksandr

-Original Message-
From: Shiv Kumar Dixit 
Sent: Wednesday, February 14, 2024 2:56 PM
To: users@activemq.apache.org
Subject: RE: PowerShell and STOMP Support

Thanks Domenico for the quick response.

If there a way to set some custom headers while sending the messages to broker? 
I tried to get help (.\artemis.cmd help producer) on the CLI but I don’t see 
any option.

Best Regards
Shiv

-Original Message-
From: Domenico Francesco Bruscino 
Sent: Monday, February 12, 2024 7:09 PM
To: users@activemq.apache.org
Subject: Re: PowerShell and STOMP Support



CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally 
trusted by Eurofins.

Do not click on links or open attachments unless you recognise the sender and 
are certain that the content is safe.

Hi Shiv,

I confirm that the client needs to have the binary to execute artemis producer 
and it supports certificate based authentication. i.e.

.\bin\artemis producer --url
'tcp://localhost:61616?sslEnabled=true=mykeystore.jks=***=mytruststore.jks=***'
--protocol core --user admin --password admin --destination queue://TEST 
--message-count 1 --message 'Hello World!'

Regards,
Domenico

On Mon, 12 Feb 2024 at 14:24, Shiv Kumar Dixit 
 wrote:

> Hi Domenico,
> Thanks for the response.
>
> Use-case is to send some status message to broker while executing an
> Octopus runbook. Client mentioned that they can call PS script hence I
> was exploring in that direction with STOMP.
>
> 'artemis producer .' could be a good option but client needs to
> have the binary to execute this step, correct?
>
> Also if 'artemis producer ' supports certificate based
> authentication as brokers only exposing SSL port over certificate 
> authentication?
>
> Best Regards
> Shiv
>
> -Original Message-
> From: Domenico Francesco Bruscino 
> Sent: Monday, February 12, 2024 5:56 PM
> To: users@activemq.apache.org
> Subject: Re: PowerShell and STOMP Support
>
>
>
> CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not
> formally trusted by Eurofins.
>
> Do not click on links or open attachments unless you recognise the
> sender and are certain that the content is safe.
>
> Hi Shiv,
>
> for text messages you could use the artemis CLI, i.e. .\bin\artemis
> producer --url tcp://localhost:61616 --protocol core --user admin
> --password admin --destination queue://TEST --message-count 1
> --message 'Hellow World!'
>
> Regards,
> Domenico
>
>
> On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit
>  wrote:
>
> > Hi,
> > I am exploring a way to securely (TLS) send/receive message to
> > Artemis broker via PowerShell. Previously I tried configuring REST
> > interface, but it was updated in community ticket that REST
> > interface is now decommissioned, and STOMP protocol is expected to
> > cover all the use cases intended for REST interface.
> >
> > If there is any example or KB available to use STOMP and PowerShell
> > together which I can refer? Currently I don't see any PowerShell
> > script sample included with Artemis distribution.
> >
> > Thanks
> > Shiv
> >
> >
>
---

This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. AO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed.

---


Re: PowerShell and STOMP Support

2024-02-16 Thread Justin Bertram
I'm sure there are STOMP and/or AMQP clients out there which you can use
from PowerShell to send messages. However, ActiveMQ itself doesn't provide
such clients.

I recommend you check out stomp.py [1]. I know it supports the ability to
send messages from the command-line so you should be able to integrate it
into your PowerShell script. If its command-line support doesn't suit your
needs I'm sure it would be simple to write your own Python script and use
its full-featured client API to do exactly what you want.


Justin

[1] https://github.com/jasonrbriggs/stomp.py

On Mon, Feb 12, 2024 at 2:37 AM Shiv Kumar Dixit
 wrote:

> Hi,
> I am exploring a way to securely (TLS) send/receive message to Artemis
> broker via PowerShell. Previously I tried configuring REST interface, but
> it was updated in community ticket that REST interface is now
> decommissioned, and STOMP protocol is expected to cover all the use cases
> intended for REST interface.
>
> If there is any example or KB available to use STOMP and PowerShell
> together which I can refer? Currently I don't see any PowerShell script
> sample included with Artemis distribution.
>
> Thanks
> Shiv
>
>


Re: PowerShell and STOMP Support

2024-02-15 Thread Domenico Francesco Bruscino
Hi Shiv,

there is no way to set custom property by using the artemis producer
command. Another alternative to send messages from a shell is by using the
jolokia endpoint but it should, i.e.

curl -X POST -H "Content-Type: application/json" -H "Origin:
http://localhost:8161; -u admin:admin http://localhost:8161/console/jolokia
-d
'{"type":"exec","mbean":"org.apache.activemq.artemis:broker=\"0.0.0.0\",component=addresses,address=\"TEST\"","operation":"sendMessage(java.util.Map,int,java.lang.String,boolean,java.lang.String,java.lang.String)","arguments":["{\"test\":\"abc\"}",0,"TEST",false,"admin","admin"]}'

Of course you can secure the jolokia endpoint and use mutual authentication
in place of username/password, for further details see
https://activemq.apache.org/components/artemis/documentation/latest/security.html#securing-the-console

Regards,
Domenico

On Wed, 14 Feb 2024 at 12:56, Shiv Kumar Dixit
 wrote:

> Thanks Domenico for the quick response.
>
> If there a way to set some custom headers while sending the messages to
> broker? I tried to get help (.\artemis.cmd help producer) on the CLI but I
> don’t see any option.
>
> Best Regards
> Shiv
>
> -Original Message-
> From: Domenico Francesco Bruscino 
> Sent: Monday, February 12, 2024 7:09 PM
> To: users@activemq.apache.org
> Subject: Re: PowerShell and STOMP Support
>
>
>
> CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally
> trusted by Eurofins.
>
> Do not click on links or open attachments unless you recognise the sender
> and are certain that the content is safe.
>
> Hi Shiv,
>
> I confirm that the client needs to have the binary to execute artemis
> producer and it supports certificate based authentication. i.e.
>
> .\bin\artemis producer --url
>
> 'tcp://localhost:61616?sslEnabled=true=mykeystore.jks=***=mytruststore.jks=***'
> --protocol core --user admin --password admin --destination queue://TEST
> --message-count 1 --message 'Hello World!'
>
> Regards,
> Domenico
>
> On Mon, 12 Feb 2024 at 14:24, Shiv Kumar Dixit
>  wrote:
>
> > Hi Domenico,
> > Thanks for the response.
> >
> > Use-case is to send some status message to broker while executing an
> > Octopus runbook. Client mentioned that they can call PS script hence I
> > was exploring in that direction with STOMP.
> >
> > 'artemis producer .' could be a good option but client needs to
> > have the binary to execute this step, correct?
> >
> > Also if 'artemis producer ' supports certificate based
> > authentication as brokers only exposing SSL port over certificate
> authentication?
> >
> > Best Regards
> > Shiv
> >
> > -Original Message-
> > From: Domenico Francesco Bruscino 
> > Sent: Monday, February 12, 2024 5:56 PM
> > To: users@activemq.apache.org
> > Subject: Re: PowerShell and STOMP Support
> >
> >
> >
> > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not
> > formally trusted by Eurofins.
> >
> > Do not click on links or open attachments unless you recognise the
> > sender and are certain that the content is safe.
> >
> > Hi Shiv,
> >
> > for text messages you could use the artemis CLI, i.e. .\bin\artemis
> > producer --url tcp://localhost:61616 --protocol core --user admin
> > --password admin --destination queue://TEST --message-count 1
> > --message 'Hellow World!'
> >
> > Regards,
> > Domenico
> >
> >
> > On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit
> >  wrote:
> >
> > > Hi,
> > > I am exploring a way to securely (TLS) send/receive message to
> > > Artemis broker via PowerShell. Previously I tried configuring REST
> > > interface, but it was updated in community ticket that REST
> > > interface is now decommissioned, and STOMP protocol is expected to
> > > cover all the use cases intended for REST interface.
> > >
> > > If there is any example or KB available to use STOMP and PowerShell
> > > together which I can refer? Currently I don't see any PowerShell
> > > script sample included with Artemis distribution.
> > >
> > > Thanks
> > > Shiv
> > >
> > >
> >
>


RE: PowerShell and STOMP Support

2024-02-14 Thread Shiv Kumar Dixit
Thanks Domenico for the quick response.

If there a way to set some custom headers while sending the messages to broker? 
I tried to get help (.\artemis.cmd help producer) on the CLI but I don’t see 
any option.

Best Regards
Shiv

-Original Message-
From: Domenico Francesco Bruscino  
Sent: Monday, February 12, 2024 7:09 PM
To: users@activemq.apache.org
Subject: Re: PowerShell and STOMP Support



CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally 
trusted by Eurofins.

Do not click on links or open attachments unless you recognise the sender and 
are certain that the content is safe.

Hi Shiv,

I confirm that the client needs to have the binary to execute artemis producer 
and it supports certificate based authentication. i.e.

.\bin\artemis producer --url
'tcp://localhost:61616?sslEnabled=true=mykeystore.jks=***=mytruststore.jks=***'
--protocol core --user admin --password admin --destination queue://TEST 
--message-count 1 --message 'Hello World!'

Regards,
Domenico

On Mon, 12 Feb 2024 at 14:24, Shiv Kumar Dixit 
 wrote:

> Hi Domenico,
> Thanks for the response.
>
> Use-case is to send some status message to broker while executing an 
> Octopus runbook. Client mentioned that they can call PS script hence I 
> was exploring in that direction with STOMP.
>
> 'artemis producer .' could be a good option but client needs to 
> have the binary to execute this step, correct?
>
> Also if 'artemis producer ' supports certificate based 
> authentication as brokers only exposing SSL port over certificate 
> authentication?
>
> Best Regards
> Shiv
>
> -Original Message-
> From: Domenico Francesco Bruscino 
> Sent: Monday, February 12, 2024 5:56 PM
> To: users@activemq.apache.org
> Subject: Re: PowerShell and STOMP Support
>
>
>
> CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not 
> formally trusted by Eurofins.
>
> Do not click on links or open attachments unless you recognise the 
> sender and are certain that the content is safe.
>
> Hi Shiv,
>
> for text messages you could use the artemis CLI, i.e. .\bin\artemis 
> producer --url tcp://localhost:61616 --protocol core --user admin 
> --password admin --destination queue://TEST --message-count 1 
> --message 'Hellow World!'
>
> Regards,
> Domenico
>
>
> On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit 
>  wrote:
>
> > Hi,
> > I am exploring a way to securely (TLS) send/receive message to 
> > Artemis broker via PowerShell. Previously I tried configuring REST 
> > interface, but it was updated in community ticket that REST 
> > interface is now decommissioned, and STOMP protocol is expected to 
> > cover all the use cases intended for REST interface.
> >
> > If there is any example or KB available to use STOMP and PowerShell 
> > together which I can refer? Currently I don't see any PowerShell 
> > script sample included with Artemis distribution.
> >
> > Thanks
> > Shiv
> >
> >
>


Re: PowerShell and STOMP Support

2024-02-12 Thread Domenico Francesco Bruscino
Hi Shiv,

I confirm that the client needs to have the binary to execute artemis
producer and it supports certificate based authentication. i.e.

.\bin\artemis producer --url
'tcp://localhost:61616?sslEnabled=true=mykeystore.jks=***=mytruststore.jks=***'
--protocol core --user admin --password admin --destination queue://TEST
--message-count 1 --message 'Hello World!'

Regards,
Domenico

On Mon, 12 Feb 2024 at 14:24, Shiv Kumar Dixit
 wrote:

> Hi Domenico,
> Thanks for the response.
>
> Use-case is to send some status message to broker while executing an
> Octopus runbook. Client mentioned that they can call PS script hence I was
> exploring in that direction with STOMP.
>
> 'artemis producer .' could be a good option but client needs to have
> the binary to execute this step, correct?
>
> Also if 'artemis producer ' supports certificate based authentication
> as brokers only exposing SSL port over certificate authentication?
>
> Best Regards
> Shiv
>
> -Original Message-
> From: Domenico Francesco Bruscino 
> Sent: Monday, February 12, 2024 5:56 PM
> To: users@activemq.apache.org
> Subject: Re: PowerShell and STOMP Support
>
>
>
> CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally
> trusted by Eurofins.
>
> Do not click on links or open attachments unless you recognise the sender
> and are certain that the content is safe.
>
> Hi Shiv,
>
> for text messages you could use the artemis CLI, i.e. .\bin\artemis
> producer --url tcp://localhost:61616 --protocol core --user admin
> --password admin --destination queue://TEST --message-count 1 --message
> 'Hellow World!'
>
> Regards,
> Domenico
>
>
> On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit
>  wrote:
>
> > Hi,
> > I am exploring a way to securely (TLS) send/receive message to Artemis
> > broker via PowerShell. Previously I tried configuring REST interface,
> > but it was updated in community ticket that REST interface is now
> > decommissioned, and STOMP protocol is expected to cover all the use
> > cases intended for REST interface.
> >
> > If there is any example or KB available to use STOMP and PowerShell
> > together which I can refer? Currently I don't see any PowerShell
> > script sample included with Artemis distribution.
> >
> > Thanks
> > Shiv
> >
> >
>


RE: PowerShell and STOMP Support

2024-02-12 Thread Shiv Kumar Dixit
Hi Domenico,
Thanks for the response.

Use-case is to send some status message to broker while executing an Octopus 
runbook. Client mentioned that they can call PS script hence I was exploring in 
that direction with STOMP.

'artemis producer .' could be a good option but client needs to have the 
binary to execute this step, correct?

Also if 'artemis producer ' supports certificate based authentication as 
brokers only exposing SSL port over certificate authentication?

Best Regards
Shiv

-Original Message-
From: Domenico Francesco Bruscino  
Sent: Monday, February 12, 2024 5:56 PM
To: users@activemq.apache.org
Subject: Re: PowerShell and STOMP Support



CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally 
trusted by Eurofins.

Do not click on links or open attachments unless you recognise the sender and 
are certain that the content is safe.

Hi Shiv,

for text messages you could use the artemis CLI, i.e. .\bin\artemis producer 
--url tcp://localhost:61616 --protocol core --user admin --password admin 
--destination queue://TEST --message-count 1 --message 'Hellow World!'

Regards,
Domenico


On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit 
 wrote:

> Hi,
> I am exploring a way to securely (TLS) send/receive message to Artemis 
> broker via PowerShell. Previously I tried configuring REST interface, 
> but it was updated in community ticket that REST interface is now 
> decommissioned, and STOMP protocol is expected to cover all the use 
> cases intended for REST interface.
>
> If there is any example or KB available to use STOMP and PowerShell 
> together which I can refer? Currently I don't see any PowerShell 
> script sample included with Artemis distribution.
>
> Thanks
> Shiv
>
>


Re: PowerShell and STOMP Support

2024-02-12 Thread Domenico Francesco Bruscino
Hi Shiv,

for text messages you could use the artemis CLI, i.e. .\bin\artemis
producer --url tcp://localhost:61616 --protocol core --user admin
--password admin --destination queue://TEST --message-count 1 --message
'Hellow World!'

Regards,
Domenico


On Mon, 12 Feb 2024 at 09:32, Shiv Kumar Dixit
 wrote:

> Hi,
> I am exploring a way to securely (TLS) send/receive message to Artemis
> broker via PowerShell. Previously I tried configuring REST interface, but
> it was updated in community ticket that REST interface is now
> decommissioned, and STOMP protocol is expected to cover all the use cases
> intended for REST interface.
>
> If there is any example or KB available to use STOMP and PowerShell
> together which I can refer? Currently I don't see any PowerShell script
> sample included with Artemis distribution.
>
> Thanks
> Shiv
>
>


PowerShell and STOMP Support

2024-02-12 Thread Shiv Kumar Dixit
Hi,
I am exploring a way to securely (TLS) send/receive message to Artemis broker 
via PowerShell. Previously I tried configuring REST interface, but it was 
updated in community ticket that REST interface is now decommissioned, and 
STOMP protocol is expected to cover all the use cases intended for REST 
interface.

If there is any example or KB available to use STOMP and PowerShell together 
which I can refer? Currently I don't see any PowerShell script sample included 
with Artemis distribution.

Thanks
Shiv