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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
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.