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 <shivkumar.di...@it.eurofinseu.com.INVALID>
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 <bruscin...@gmail.com>
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&keyStorePath=mykeystore.jks&keyStorePassword=***&trustStorePath=mytruststore.jks&trustStorePassword=***'
--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 
<shivkumar.di...@it.eurofinseu.com.invalid> 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 <bruscin...@gmail.com>
> 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
> <shivkumar.di...@it.eurofinseu.com.invalid> 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.

-----------------------------------

Reply via email to