seb5law

seb5law OP

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

First 8 of 8 Posts Switch mode

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

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New

We're in Beta

About us Mission Statement