> Then, I send this information to the NOTIFICATION queue using JMS within the Spring Boot backend.
Does it have to be a JMS queue? Can it be a JMS topic instead? If it can be a JMS topic then you should be able to use MQTT on your Angular clients. If not, then I recommend you use the STOMP protocol from your Angular clients. Justin On Mon, May 6, 2024 at 4:43 AM Pushparaj Chinnathambi <pushpara...@raster.in> wrote: > I totally agree with you. > I am very new to Apache ActiveMQ, so I don’t fully understand the MQTT > logic yet. Let me explain my scenario to you to clarify my requirements. > > The admin assigns tasks to users. In the backend, which is built with > Spring Boot, this information is stored in a database. Then, I send this > information to the NOTIFICATION queue using JMS within the Spring Boot > backend. The client users need to listen to this NOTIFICATION queue to > update the tasks on their screens, which are built using Angular. > > Could you please guide me on how I can achieve this within the queuing > system? > > > [image: image.png] > > On Sun, 5 May 2024 at 08:33, Justin Bertram <jbert...@apache.org> wrote: > >> Generally speaking, using JMS from Spring Boot for asynchronous >> communication makes sense. This is a common use-case. >> >> My question is why are you using a JMS queue in conjunction with MQTT. Why >> not a JMS topic together with MQTT or a JMS queue together with STOMP? >> >> The problem with using a JMS queue and MQTT is that, as I mentioned >> previously, MQTT is fundamentally a pub/sub protocol so it doesn't really >> work well with the point-to-point semantics of a JMS queue. Given this >> discrepancy I'm not sure it actually is possible to make your use-case >> work. >> >> >> Justin >> >> On Sat, May 4, 2024 at 2:36 AM Pushparaj Chinnathambi < >> pushpara...@raster.in> >> wrote: >> >> > The reason I’m using JMS is to send messages from a Spring Boot >> > microservice. This is because, in my architecture, I’m utilizing >> > asynchronous communication between the microservices using apache >> activemq >> > artemis queues. >> > >> > On Sat, 4 May, 2024, 10:50 am Justin Bertram, <jbert...@apache.org> >> wrote: >> > >> > > FYI - I opened ARTEMIS-4760 [1] for this issue. I'll send a PR with a >> fix >> > > soon. >> > > >> > > >> > > Justin >> > > >> > > [1] https://issues.apache.org/jira/browse/ARTEMIS-4760 >> > > >> > > On Fri, May 3, 2024 at 12:46 PM Justin Bertram <jbert...@apache.org> >> > > wrote: >> > > >> > > > I believe this is a bug in the MQTT implementation. As noted in the >> > > > documentation [1]: >> > > > >> > > > > Automatic queue creation is for queues that would not otherwise be >> > > > created during normal operation. >> > > > >> > > > However, the MQTT implementation is deciding on whether to create >> the >> > > > subscription queue based on the <auto-create-queues> setting. I'll >> > open a >> > > > Jira and get this fixed. >> > > > >> > > > In the meantime you can work-around this by setting >> > <auto-create-queues> >> > > > to true for the relevant address(es). >> > > > >> > > > >> > > > Justin >> > > > >> > > > [1] >> > > > >> > > >> > >> https://activemq.apache.org/components/artemis/documentation/latest/address-model.html#automatic-configuration >> > > > >> > > > On Tue, Apr 30, 2024 at 8:41 AM Pushparaj Chinnathambi < >> > > > pushpara...@raster.in> wrote: >> > > > >> > > >> Hi, >> > > >> I’m trying to connect an ActiveMQ Artemis topic queue >> with >> > the >> > > >> following configurations. Based on my settings, I don’t want to >> create >> > > >> dynamic queues when clients establish new connections. However, >> after >> > > >> applying this configuration, I’m unable to connect to my topic >> queue. >> > > >> Could >> > > >> you please explain why this is happening and guide me to connect >> the >> > > topic >> > > >> queue without creating the new queue? >> > > >> >> > > >> *broker.xml* configuration >> > > >> >> > > >> ``` >> > > >> <address-settings> >> > > >> <!-- if you define auto-create on certain queues, >> management >> > > has >> > > >> to be auto-create --> >> > > >> <address-setting match="activemq.management#"> >> > > >> <dead-letter-address>DLQ</dead-letter-address> >> > > >> <expiry-address>ExpiryQueue</expiry-address> >> > > >> <redelivery-delay>0</redelivery-delay> >> > > >> <!-- with -1 only the global-max-size is in use for >> > limiting >> > > >> --> >> > > >> <max-size-bytes>-1</max-size-bytes> >> > > >> >> > > >> >> > > >> <message-counter-history-day-limit>10</message-counter-history-day-limit> >> > > >> <address-full-policy>PAGE</address-full-policy> >> > > >> <auto-create-queues>false</auto-create-queues> >> > > >> <auto-create-addresses>false</auto-create-addresses> >> > > >> </address-setting> >> > > >> <!--default for catch all--> >> > > >> <address-setting match="#"> >> > > >> <dead-letter-address>DLQ</dead-letter-address> >> > > >> <expiry-address>ExpiryQueue</expiry-address> >> > > >> <redelivery-delay>0</redelivery-delay> >> > > >> >> > > >> >> > > >> >> > > >> <message-counter-history-day-limit>10</message-counter-history-day-limit> >> > > >> <address-full-policy>PAGE</address-full-policy> >> > > >> <auto-create-queues>false</auto-create-queues> >> > > >> <auto-create-addresses>false</auto-create-addresses> >> > > >> <auto-delete-queues>false</auto-delete-queues> >> > > >> <auto-delete-addresses>false</auto-delete-addresses> >> > > >> >> > > >> <!-- The size of each page file --> >> > > >> <page-size-bytes>10M</page-size-bytes> >> > > >> >> > > >> <!-- When we start applying the address-full-policy, >> e.g >> > > >> paging >> > > >> --> >> > > >> <!-- Both are disabled by default, which means we will >> use >> > > the >> > > >> global-max-size/global-max-messages --> >> > > >> <max-size-bytes>-1</max-size-bytes> >> > > >> <max-size-messages>-1</max-size-messages> >> > > >> >> > > >> <!-- When we read from paging into queues (memory) --> >> > > >> >> > > >> <max-read-page-messages>-1</max-read-page-messages> >> > > >> <max-read-page-bytes>20M</max-read-page-bytes> >> > > >> >> > > >> <!-- Limit on paging capacity before starting to throw >> > > errors >> > > >> --> >> > > >> >> > > >> <page-limit-bytes>-1</page-limit-bytes> >> > > >> <page-limit-messages>-1</page-limit-messages> >> > > >> </address-setting> >> > > >> </address-settings> >> > > >> ``` >> > > >> >> > > >> by using this configuration I'm facing queue not found error in >> > > >> *artemis.log* file >> > > >> >> > > >> ``` >> > > >> 2024-04-29 19:15:34,563 ERROR >> > > >> [org.apache.activemq.artemis.core.protocol.mqtt] AMQ834002: Error >> > > >> processing control packet: >> > > >> >> > MqttSubscribeMessage[fixedHeader=MqttFixedHeader[messageType=SUBSCRIBE, >> > > >> isDup=false, qosLevel=AT_LEAST_ONCE, isRetain=false, >> > > remainingLength=35], >> > > >> >> variableHeader=MqttMessageIdAndPropertiesVariableHeader[messageId=1, >> > > >> properties=io.netty.handler.codec.mqtt.MqttProperties@511f28bc], >> > > >> >> > > >> >> > > >> > >> payload=MqttSubscribePayload[MqttTopicSubscription[topicFilter=ONEEMR/PUSH_NOTIFICATION_TOPIC, >> > > >> option=SubscriptionOption[qos=AT_LEAST_ONCE, noLocal=false, >> > > >> retainAsPublished=false, retainHandling=SEND_AT_SUBSCRIBE]]]] >> > > >> >> > org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException: >> > > >> AMQ229017: Queue ONEEMR.PUSH_NOTIFICATION_TOPIC does not exist >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.core.protocol.mqtt.MQTTSubscriptionManager.createQueueForSubscription(MQTTSubscriptionManager.java:163) >> > > >> ~[artemis-mqtt-protocol-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.core.protocol.mqtt.MQTTSubscriptionManager.addSubscription(MQTTSubscriptionManager.java:108) >> > > >> ~[artemis-mqtt-protocol-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.core.protocol.mqtt.MQTTSubscriptionManager.addSubscriptions(MQTTSubscriptionManager.java:303) >> > > >> ~[artemis-mqtt-protocol-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleSubscribe(MQTTProtocolHandler.java:382) >> > > >> ~[artemis-mqtt-protocol-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:177) >> > > >> ~[artemis-mqtt-protocol-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32) >> > > >> ~[artemis-commons-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68) >> > > >> ~[artemis-commons-2.33.0.jar:2.33.0] >> > > >> at >> > > >> >> > > >> >> > > >> > >> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) >> > > >> [?:?] >> > > >> at >> > > >> >> > > >> >> > > >> > >> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) >> > > >> [?:?] >> > > >> at >> > > >> >> > > >> >> > > >> > >> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) >> > > >> [artemis-commons-2.33.0.jar:2.33.0] >> > > >> ``` >> > > >> *Thanks in advance😊😊* >> > > >> >> > > >> On Tue, 30 Apr 2024 at 10:58, Justin Bertram <jbert...@apache.org> >> > > wrote: >> > > >> >> > > >> > From what I can tell you aren't actually subscribed to the >> ActiveMQ >> > > >> users >> > > >> > list so you will not receive any replies sent to the list and not >> > > >> directly >> > > >> > to you (which is how replies are normally sent). Please subscribe >> > [1] >> > > to >> > > >> > the list in order to use it properly. Thanks! >> > > >> > >> > > >> > Also, please be aware that screenshots attached to emails are not >> > > passed >> > > >> > to subscribers. If a screenshot is critical to explaining your >> issue >> > > >> please >> > > >> > upload it somewhere and provide a link to it. Otherwise simply >> > > describe >> > > >> in >> > > >> > more detail what your problem actually is without referencing >> > > >> screenshots. >> > > >> > >> > > >> > >> > > >> > Justin >> > > >> > >> > > >> > [1] https://activemq.apache.org/contact >> > > >> > >> > > >> > On Tue, Apr 30, 2024 at 12:14 AM Pushparaj Chinnathambi < >> > > >> > pushpara...@raster.in> wrote: >> > > >> > >> > > >> >> Hi, >> > > >> >> I’m trying to connect an ActiveMQ Artemis topic queue >> > with >> > > >> the >> > > >> >> following configurations. Based on my settings, I don’t want to >> > > create >> > > >> >> dynamic queues when clients establish new connections. However, >> > after >> > > >> >> applying this configuration, I’m unable to connect to my topic >> > queue. >> > > >> Could >> > > >> >> you please explain why this is happening and guide me on >> resolving >> > > this >> > > >> >> issue? >> > > >> >> >> > > >> >> >> > > >> >> [image: broker-file-configuration.png] >> > > >> >> [image: log-file.png][image: queue-settings.png] >> > > >> >> -- >> > > >> >> *------------------------* >> > > >> >> *Thanks & Regards,* >> > > >> >> *Pushparaj Chinnathambi* >> > > >> >> Team Lead >> > > >> >> *Raster Images Pvt. Ltd.* >> > > >> >> Salem 636 004, TN, India >> > > >> >> E: pushpara...@raster.in >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> > > >> -- >> > > >> *------------------------* >> > > >> *Thanks & Regards,* >> > > >> *Pushparaj Chinnathambi* >> > > >> Team Lead >> > > >> *Raster Images Pvt. Ltd.* >> > > >> Salem 636 004, TN, India >> > > >> E: pushpara...@raster.in >> > > >> >> > > > >> > > >> > >> > > > -- > *------------------------* > *Thanks & Regards,* > *Pushparaj Chinnathambi* > Team Lead > *Raster Images Pvt. Ltd.* > Salem 636 004, TN, India > E: pushpara...@raster.in > > >