seb5law

seb5law

We need to send files into a Java based Messaging Queue via JMS. So far I had no luck finding a library or instructions on how to post a message via JMS.
Did I Overlook an obvious way to do so or is there a library that I could use?
Thanks in advance for your help

Showing Posts 1 to 8

jeremyjh

jeremyjh

JMS is a Java API, so you can’t use it in Elixir. What is the actual product you are using? Most of them support multiple protocols. ActiveMQ for example supports AMQP and STOMP, both of which have BEAM clients.

NobbZ

NobbZ

Well, should be possible through jinterface.

Aside of that, on the Wikipedia page about JMS RabbitMQ is listed as a provider implementation… Perhaps @seb5law can find some hints in rabbits source code?

jeremyjh

jeremyjh

Yes, but then he would be writing a Java program that had a convenient way to talk to an Elixir program. He wouldn’t be using JMS in Elixir.

NobbZ

NobbZ

Never actually used jinterface, only now about its existence, but I always assumed it were similar to how one does create NIF bindings to C-ABI compatible libraries…

Writing small wrapping functions that will wrap from erlang types to the target types and back…

At least the OP were able to use the JMS through the jinterface one way or the other…

jeremyjh

jeremyjh

No, its more like erl_connect, which is used to build “C Nodes”. Jinterface is used to build “J Nodes”. I’d only do this if there was absolutely no other way as now you’ve introduced a whole separate server process to manage, just to talk to another server.

The link you posted tells you this upfront:

JMS is not a message or wire format so much as it is a Java client API, and all the message broker products that implement it also implement other protocols.

seb5law

seb5law OP

Okay, thanks @jeremyjh. To describe the problem at hand a bit:

We have a system that stores product. That system exports changes of a products data as a XML file on its host. Currently that message needs to be sent to five recipients, all Java based queues. The senders are currently externally developed java ‘snippets’ that they call JMS senders. Now we have to send these messages to three more recipients, all Java based queues.

Rather than letting the next three senders (that’s really what the external developers would do and charge for) be implemented in Java for a lot of money and a few other drawbacks, we want to use our own queue (e.g. RabbitMQ). To which we will enqueue the XML file into eight queues and handle the sending to the eight recipients. The recipients do not want to change anything in their queues and thus only support the JMS API.

Any thoughts on a better approach or a way to communicate with this JMS API via Elixir?

jeremyjh

jeremyjh

I think you could use Rabbit to bridge to the JMS queues. And then just use the Elixir amqp client to talk to Rabbit. But if you have no other use for Rabbit than to be this bridge and have never managed a Rabbit server before you are bringing in some accidental complexity. Next to which just writing a Java program to look for these XML files or accept them in an HTTP payload and push them into the queue seems a bit much.

seb5law

seb5law OP

Thank you for your advice. RabbitMQ and the JMS Client plugin should work for us.

— All posts loaded —

Where Next? Top

Trending in Questions Top

water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New

Other Trending Topics Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews