Micro integrator - RabbitMQ workflow - rabbitmq

I'm looking into integration of WSO2 MI and RabbitMQ, the goal is to create a system with the following steps:
1. MI receive request from a client and send the message to RabbitMQ
2. RabbitMQ put message in the queue and it's taken by the subscriber client for processing.
3. Message with response from the processing service placed into response RabbitMQ queue.
4. MI receive message from that response queue and send reply to the client.
There is following documentation in wso2 official manuals:
https://ei.docs.wso2.com/en/latest/micro-integrator/setup/brokers/configure-with-rabbitMQ/
https://ei.docs.wso2.com/en/latest/micro-integrator/use-cases/examples/jms_examples/rabbitmq-examples/
I assume that's what I need, but it's not clear how exactly these should be executed.
Let's say I've configured a connection to RabbitMQ in MI.
How exactly do I use these synapse configurations mentioned in the docs to be able to send messages to rabbit based on the client request or reply to a client based on messages from rabbit?

There are multiple patterns for synchronous/asynchronous messaging with RabbitMQ in WSO2 Enterprise Integrator. Please have a look at these examples.
Point to Point
Publisher/Subscriber
Guaranteed Delivery
Request/Response - Dual Channel
Furthermore, you can find a tutorial for the asynchronous messaging from here!

Related

clear messages from rabbitMQ queue in mule 3

My requirement is to clear all the messages from queue before processing the flow or publishing anything in the queue.
We are using rabbitMQ and due to some reason messages are stucked in the queue and because of that we are facing some issue when we are counting the queue based on the messages. so for the next time before processing we have to clear the queue.
Here we have multiple queue like slave1, slave2,slave3 and when api will be triggered in the process section we have to clear the queue.
Kindly suggest how we can do this in mule3.
Mule 3 has a generic AMQP connector. It does not support administrative commands from a specific implementation like RabbitMQ, so you can't use the connector.
You could use RabbitMQ REST API and call it using the HTTP Request connector. See this previous answer to see how to delete queues with Curl, then implement the same request with HTTP Request: https://stackoverflow.com/a/29148299/721855

Can a MQTT Subscriber be able to take concurrently multiple messages of the Same Topic?

I am trying to create a Subscriber in my Spring Boot Application. My objective is that the publisher will send multiple messages to a topic and I have to get those message and process them .I noticed that the "handleMessage" of both Paho and Apache ActiveMq will process 1 message at a time. Is it possible to make it concurrent??
I have tried the following
Replaced Paho with ActiveMq
Provided concurrency in my listenercontainer
Provided prefetch in my subscribe URL
Please let me know if there is any way to make my MQTT subscriber to take multiple messages concurrently.
Thank You
If you supply your own thread pool you can have the handleMessage method pass the incoming message off to the threadpool to process and then pass the next message off to the pool.

Redis PUB/SUB: how to ignore own messages?

The idea is:
I have N WCF services which connected and subscribed to the same Redis message channel. These services use this channel to exchange messages to sync some caches and other data.
How each service can ignore its own messages? I.e. how to publish to all but me?
It looks like Redis PUB/SUB doesn't support such filtration. So, the solution is to use set of individual channels for every publisher and common channel for subscription synchronization between them. Here is an golang example of no-echo chat application.

How to publish message from WSO2 ESB to RabbitMQ?

I am trying to configure wso2 esb with rabbitmq. I've read this article.Whenever i sent a message from the sender , It reached out the queue named Q1 as well as ESB console. But it doesn't reach queue named Q2.
Does anybody has a solution ?
thanks
According to the provided end-point all messages should publish to the queue test via test exchange. You can introduce rabbitmq.queue.routing.key property to your endpoint and bind your test queue to test exchange using that route key.
If you have already configured axis2.xml/proxy service correctly according to the documentation[1], there can be a configuration issue at your RabbitMQ server side.You can confirm that writing a simple java client according to the article[2] or refer this tutorial[2].
Or you may remove test-queue/test-exchange from RabbitMQ server and try your endpoint.
[1]. http://docs.wso2.org/display/ESB460/RabbitMQ+AMQP+Transport
[2]. http://www.rabbitmq.com/tutorials/tutorial-one-java.html

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