best way to transport messages between two different WSO2ESB - wso2-esb

I'm new to WSO2 so please be forgiving.
My problem is how to connect two separates WSO2 ESB to transport messages between them (a particularly invoke web services seamlessly).
I know it is a very general question and the exact answer may be not possible, but I would like to know in which direction to go. Is it good idea to use JMS transport and e.g ActiveMQ as message broker? And how to test if that connection works?
Thanks in advance!

There is a lot of solutions, but I think you're right when you speak abour JMS and ActiveMQ. It's very simple to use, just "send" a message to a jms queue with an address endpoint and consume messages from that queue with a JMS proxy.
See https://docs.wso2.com/display/ESB481/Java+Message+Service+%28JMS%29+Support

Related

ActiveMQ: Transforming OpenWire and STOMP messages

EDIT2: My issue here was caused by an insufficient understanding of how transport connectors work in ActiveMQ. TL;DR is that ActiveMQ will implicitly "transform" or "relay" messages between your transport connector configurations defined in activemq.xml.
EDIT: Additional info, the STOMP messages received by the Angular application are used for debugging and demo purposes. Hence, simply converting the OpenWire message to a blob of readable text is sufficient.
I'm creating an Angular application (preferably website, avoiding native applications), which objective is to "tap in" by web sockets on an ActiveMQ server and subscribe to OpenWire messages. How do I let ActiveMQ transform OpenWire messages to STOMP messages and send these to any clients (i.e. my Angular application) connected to the ActiveMQ WebSocket connector?
In addtiion, it would be nice-to-have if I could transform STOMP to OpenWire as well.
It must be Angular
Avoiding the use of native applications on the client-side is preferable although not a deal-breaker.
Adding extra processing stress on the ActiveMQ server must be done with caution.
To the best of my knowledge, it is only possible to let Angular "talk directly" with the ActiveMQ server by STOMP messages send by web socket, if I am to avoid using native applications.
I already have an Angular application capable of STOMP communication by web sockets (e.g. something like https://github.com/stomp-js/ng2-stompjs-angular7).
I am missing information on how to configure the ActiveMQ server to transform OpenWire-->STOMP through its transport connectors.
In my understanding, what I am trying to do should be possible. It is noted by other users but not how. E.g. users hint that what I want is possible in ActiveMQ but not Apollo: ActiveMQ to Apollo transition, Openwire to Stomp protocol configuration.
I expect (preferably) the need to use something like an ActiveMQ transformer (e.g. adding transformer to the connector configuration: AMQP & Openwire - Activemq broker and 2 different consumers) or maybe writing an ActiveMQ plugin (http://activemq.apache.org/developing-plugins.html). On ActiveMQ's website, an existing transformer is mentioned (http://activemq.apache.org/stomp.html Message Transformations section):
Currently, ActiveMQ comes with a transformer that can transform XML/JSON text to Java objects
... but no mention of how to use this and I am unsure if I can benefit from this and if this means that there are no transformers for OpenWire-->STOMP or vice versa.
I expect I might have misunderstood some of the concepts, and a "you're going in a wrong direction, do this instead" can work out as a good answer for me. At the time of writing, I expect I will have to create an ActiveMQ plugin using their Message Transformer interface (http://activemq.apache.org/message-transformation.html) although their sub links are 404. I hope to achieve a more simple solution, e.g. an existing OpenWire-->STOMP transformer:
<transportConnector name="openwire" uri="{some-openwire-uri}?transport.transformer=stomp"/>
ActiveMQ will "transform" any Openwire message into a STOMP message and vice versa as needed based on client connections. I an Openwire based JMS client connects and places a message onto a queue and a STOMP based client comes along and subscribes to that queue the message will be converted into a STOMP message to send to that client.
Without knowing more about what issue you are having it is hard to provide more insight than that though. There are some cases where the transformation from Openwire to STOMP might not yield exactly the right thing for you such as a MapMessage or StreamMessage and definitely an ObjectMessage so some care needs to be taken about cross protocol messaging.
You do of course need to add a transport connector for each of the protocols you want to support, Openwire, STOMP, AMQP etc. The clients need something to connect to, then once they connect the broker manages the message transformations amongst subscriptions on Topics and Queues.

Can anyone provide me details/links regarding exchanges and queue in Rabbit MQ that can be used in Mule

I need to use Rabbit MQ in Mule application for using its exchange and queue. can anyone provide me any leads?
you can simply google and get the related links.
Anyway,
you can go through below link...I think that will be useful for you.
https://confluex.com/blog/rabbitmq-amqp-with-muleesb/

Rabbit MQ fault tolerance

I have a project where we are using Rabbit MQ has message broker, I have below concern, please help on the same.
If Rabbit MQ goes down, how we can retrieve the queued message.is there any configuration in rabbit MQ?
Can we implement same in java thread and collection combination, that can be used as alternative to rabbit MQ? if yes help with an example.
'You should listen to ShutdownListenercallback on both Connection and Channelclasses'. By this way, you know if the queue is down. After that, you need to re-transmit your queued messages. This is what official documentations says. https://www.rabbitmq.com/reliability.html
Of course you can implement your own library, but you have to think if this would be better for you. I suggest you not to do that. RabbitMQ is a well-known open source library that many people use and trust for years. I think there is no side-effect using that in any project.
Deploy RabbitMQ on Kubernetes with stateful sets. This will replicate state in multiple instances. One of them will be primary. Failover will be handled by Kubernetes.
See https://kublr.com/blog/reliable-fault-tolerant-messaging-rabbitmq-kublr/

RabbitMQ subscriber notification in .NET

We are using MSMQ right now with WCF activation feature, it enables us not to pull queue to read messages. It like push message to application.
As we are looking at porting from MSMQ to RabbitMQ going through what we need from message queue.
I can't anything regarding RabbitMQ .net client support for receiving message notification from subscribed queue?
Is there anything in RabbitMQ with .net which can do push notification to subscriber like MSMQ?
Or we need service running which constantly checks for message?
In AMQP (and RabbitMQ), there are two ways to retrieve messages: basic.get and basic.consume.
Basic.get is used to poll the server for a message. If one exists, it is returned to the client. If not, a get-empty is returned (the .NET method returns null).
Basic.consume sets the consumer for the queue. The broker pushes messages to the consumer as they arrive. You can either derive DefaultBasicConsumer, which gives you your own custom consumer, or you can use the Subscription Message Pattern, which gives you a blocking nextDelivery().
For more information, check out the API guide linked above and the .NET Client Userguide. Also, a great place to ask RabbitMQ-related questions is the rabbitmq-discuss mailing list.
I think you are after something like the EventingBasicConsumer. See also this question/answer
That is a feature provided by WAS (Windows Activation Service). Right now WAS has listener adapters for net.pipe, net.msmq and net.tcp (and its port sharing service). I guess you would need a specific AMQP listener adapter.
This may help http://msdn.microsoft.com/en-us/library/ms789006.aspx

Message Bridge - How to route messages from topic to queue - Glassfish

Is it possible to configure a message bridge for GlassFish? The message is currently posted to a topic, and customer requirement is to "redirect" this message from a topic to a queue. (both are on the same GlassFish server). By redirect, I mean, the message will be posted on the topic and then copied to the queue. I cannot find much documentation about this, I have read about Open MQ, JMS broker and JMS bridge, but this does not seem to fit this requirement.
I understand, that I can implement a topic subscriber and then post a message to queue. But I would like to know, if it is possible to do this just by configuration or do I have to implement a bridge?
Thanks for your help, I do appreciate it.
Vladi
You'll need to implement a bridge... or change the submitter to submit to both the queue and the topic.