You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Balamurugan Ranganathan <rb...@gmail.com> on 2024/05/03 12:13:48 UTC
Reg, How to subscribe already created queue using MQQT
Dear All,
I have configured Artemis and created an address & topic using the console.
Address --> *UI*
Queue --> *ALERTS* (ANYCAST,MULTICAST).
In backend (using java 21) I am able to access the queue name as
*UI::ALERTS.*
But using ANGULAR (ngx-mqtt ) It shows an error message as *Queue does not
exist *
Anyone please guide how to subscribe *ALERTS* queue using angular
Note: I already tried *UI::ALERTS, UI.ALERTS , UI/ALERTS , UI/+/ALERTS*
Thanks in advance.
*With Regards,*
Balamurugan Ranganathan
9789465852
Re: Reg, How to subscribe already created queue using MQQT
Posted by Vaclav Haisman <va...@broadcom.com.INVALID>.
On Fri, May 3, 2024 at 2:14 PM Balamurugan Ranganathan <
rbalamurugantech@gmail.com> wrote:
> Dear All,
>
> I have configured Artemis and created an address & topic using the console.
>
> Address --> *UI*
> Queue --> *ALERTS* (ANYCAST,MULTICAST).
>
> In backend (using java 21) I am able to access the queue name as
> *UI::ALERTS.*
>
> But using ANGULAR (ngx-mqtt ) It shows an error message as *Queue does not
> exist *
>
> Anyone please guide how to subscribe *ALERTS* queue using angular
>
>
> Note: I already tried *UI::ALERTS, UI.ALERTS , UI/ALERTS , UI/+/ALERTS*
>
>
>
My experience with MQTT in Artemis is rather limited, so please correct me
if I am wrong. But I think MQTT does not work the way you are trying to use
it.
IME, the MQTT topics are mapped to native Artemis addresses. And any MQTT
client that connects and wants to consume messages from the topic, will
have a queue created under the native Artemis address. The queue will be
named with a name derived from the address and the MQTT client ID.
So, my suggestion is to set up an address like "UI.ALERTS" using the native
syntax. Then your MQTT client would be connecting to a "UI/ALERTS" topic.
This also means that your address should be MULTICAST, otherwise only one
of the clients / queues will get the message.
--
--
VH
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.