How to enclose a message listener into Anvil project

Hello,

I am quite new to Anvil, but I really like this approach.

I would like to replace a project I made with Java using Anvil and the part, where I am struggling right now is to enclose a message listener to Anvil.

An external ActiveMQ message broker is publishing messages (topics) to which I would like to subscribe and consume this messages. For that purpose I need to establish a listener in Anvil that is consuming new topics / messages from the broker as soon as they are published.

  • Do you know, whether there are capabilities / libraries available in Anvil to enclose such a listener (in best case with Anvil available for free)?

Thanks a lot in advance for your support.

Best regards, Michael

These (and their related examples and tutorials) may help:

I don’t know how ActiveMQ works, but typically when you’re talking about setting up a listener you want something that is going to stick around and be active long-term. Anvil server side is not suitable for that, so it’ll need to be client-side. If ActiveMQ has a Javascript library, you could probably use that to maintain a listener on the client side.

I would point you to this example:

It was really useful for me in using a message broker.

Hello,
Thanks a lot for your hints. That helps a lot. I think, I will keep the listener part as stand alone and will convert the rest to Python + Anvil.

Thanks again