ActiveMQ support for ebXML as message broker - apache

Currently I am researching open source message broker technology that can provide support for ebXML I would like to use Apache ActiveMQ.
I will be looking at supporting Oasis ebXML AS4 specification.
My question is, does Apache ActiveMQ as a JMS broker offer adequate support for ebXML, in particular ebXML 3 AS4?
Are there any alternative open source message broker technology more suited to ebXML?
Lastly is there a .NET interface library to support ebXML support via ActiveMQ?
Thanks in advance,
Marcus

What do you mean by "support"?
Apache ActiveMQ is a messaging component. It does not really care about the content in the messages, but should merly be seen as a transport channel.
Apache Camel comes bundle with ActiveMQ do support XML (parsing, transforming), but not ebXML explicitly.
Typically, explicit support for these industry standard EDI formats are rarely implemented in open source middleware. There might be some old java library open source out there ( ebXml OpenSource java implementation ), but nothing very active, unfortunately.

Related

Read/write message using RFHUTILC into ActiveMQ

Can we write and read the message using RFHUTILC into ActiveMQ?
I know RFHUTILC is used for writing and reading messages into IBM MQ but my requirement is to pull/Read a message from Apache ActiveMQ.
RFHUTILC won't work, as it only talks IBM MQ's protocol, which is non-standard and specific to IBM MQ. ActiveMQ supports a number of standard and open source protocols, as #Justin Bertram mentioned.
RFHUTIL is IBM MQ only. I made a smilar tool called A that has been around sometime for ActiveMQ (generic JMS with OpenWire/ActiveMQ, HornetQ and AMQP protocols bundled) that you can use instead. It's command line though, no GUI. Free/open source.
https://github.com/fmtn/a
There are of course other similar utilities with GUI, such as Hawt.IO among others. Some are a bit outdated though (Hermes JMS).

How to modify spring-websocket to interface with broker via MQTT instead of STOMP?

I'm building a spring-websocket application that currently uses RabbitMQ as a message broker via the STOMP protocol. The rest of our organization mostly uses IBM Websphere MQ as a message broker, so we'd like to convert it away from RabbitMQ. However Websphere MQ doesn't support the STOMP protocol, which is spring-websocket's default. MQTT seems like the easiest supported protocol to use instead. Ideally our front-end web clients will continue to use STOMP, but I'm also OK with migrating them to MQTT if needed.
What classes do I need to overwrite to make spring-websocket interface with the broker via MQTT instead of STOMP? This article provides some general guidance that I should extend AbstractMessageBrokerConfiguration, but I'm unclear where to begin.
Currently I'm using the standard configuration methods: registry.enableStompBrokerRelay and registerStompEndpoints in AbstractWebSocketMessageBrokerConfigurer
Ryan has some good pointers.
The main work is going to be creating a replacement for StompBrokerRelayMessageHandler with an MqttBrokerMessageHandler that not only talks to an MQTT broker but also adapts client STOMP frames to MQTT and vice versa. The protocols are similar enough that it may be possible to find common ground but you won't know until you try.
Note that we did have plans for for MQTT support https://jira.spring.io/browse/SPR-12581 but the key issue was that SockJS which is required over the Web for fallback support does not support binary messages.
Here's my stab at this after reviewing the spring-websocket source code:
Change WebSocketConfig:
Remove #EnableWebSocketMessageBroker
Add new annotation: #EnableMqttWebSocketMessageBroker
Create MqttBrokerMessageHandler that extends AbstractBrokerMessageHandler -- suggest we copy and edit StompBrokerRelayMessageHandler
Create a new class that EnableMqttWebSocketMessageBroker imports: DelegatingMqttWebSocketMessageBrokerConfiguration
DelegatingMqttWebSocketMessageBrokerConfiguration extends AbstractMessageBrokerConfiguration directly and routes to MqttBrokerMessageHandler
Add this to server.xml on WebSphere Liberty:
<feature>websocket-1.1</feature>

ActiveMQ, STOMP, Java example

Can anyone point me to decent example where Java stomp client is used to connect to ActiveMQ.
Also I am interested in following:
Is failover supported over stomp?
How to create durable subscription?
Does stomp support asynchronous messaging? Examples? I think I have to implement MessageListener interface for it, but I wasn't able to find example for this.
If you really want to use STOMP from Java then you could look at StompJMS which maps quite a bit of the JMS API to STOMP. It doesn't support failover but there aren't a lot of stomp client's that do. When using Java you are better off to use the native JMS client from the ActiveMQ broker as it is going to be the most robust and feature complete client library you will find.

RabbitMQ, is it possible to publish via one protocol and consume via another?

RabbitMQ supports multiple protocols, AMQP, MQTT, STOMP, ....
When using PHP for example, it's easier to publish using the STOMP library since the PHP AMQP libraries requires compiled C code and is somewhat of a mission to setup if you don't have to.
On the JAVA side, apache camel with AMQP on spring is pretty straight forward.
Is it possible to setup a queue, publish to it via STOMP and then consume via AMQP and then again publish via AMQP and consume via STOMP if the message broker is RabbitMQ?
Yes, this should work, given that you have installed RabbitMQ's STOMP plugin on your RabbitMQ node(s).
The protocol only defines the communication between client and server and has no impact on a message itself.
You should note that using protocols other than AMQP will most likely come along with limitations and/or worse performance.
There also exist native PHP libraries for RabbitMQ that don't require compiling C code. Unfortunately, I cannot tell you which one is the best, because I am a Java guy ;-).

How to use RabbitMQ broker in Java application

How to use RabbitMQ message broker in Java application? I have not found any document or link to understand how to do it.
There's plenty or RabbitMQ documentation.
In particular, you may be interested in the Java client API guide and the javadocs.