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
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
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
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
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
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
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
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
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
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
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 8 of 8 Posts
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
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
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
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
jinterfaceone way or the other…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
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
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
Thank you for your advice. RabbitMQ and the JMS Client plugin should work for us.