How can we store failed messages in VM Connector iin MULE - mule

How can we store failed messages in VM Connector in MULE
Assume it is a transient flow .
Scenario is like when ever mule server is down and at the same time messages sent to publish connector.
what will be best way. Hope I am clear or bear with me for any confusion.
thanks

The VM connector works like a queue in memory, but it is not an external message broker like for example ActiveMQ or IBM MQ. The VM connector implementation is inside the Mule Runtime implementation. It can not be used to send messages to other Mule servers, nor other non-Mule applications. Also if the Mule Runtime instance is down, then it will not work at all so there is not way to publish nor receive messages. If you want that kind of reliability you need to use an external JMS message broker.

Related

Anypoint MQ - are messages persistent by default?

I am just starting out to use Anypoint MQ and in the past have used Apache ActiveMQ.
In case of Apache ActiveMQ , Mule connector provides an option where we can choose if we want to publish a message as Persistent Vs NonPersistent
Dont see that option with Publish connector for AnypointMQ
Tried googling but am not getting any details regarding the same ....
any pointers would be appreciated .. Thanks !
Anypoint MQ doesn't used that terminology or has an equivalent feature. Having said that it always operates in a similar way to ActiveMQ persistent mode. You can find it in the public documentation:
Because the storage solution for Anypoint MQ is durable, messages that were already in the Anypoint MQ system before service was interrupted are retained.

How do I find the connection information of a RabbitMQ server that is bound to a SCDF stream deployed on Tanzu (Pivotal/PCF) environment?

This is a follow-up question of How to implement HTTP request/reply when the response comes from a rabbitMQ reply queue using Spring Integration DSL?.
We were able to build the Spring Integration application and the SCDF stream successfully locally. We could send a http request to the rabbitMQ request queue which was bound to the SCDF stream rabbit source. We could also receive the response back from the rabbitMQ response queue which was bound to the SCDF stream rabbit sink.
We have deployed the SCDF stream into PCF environment which had a binding of an internal rabbitMQ broker. Now we need to specify the spring rabbitMQ connection information in the Spring Integration application properties - currently it's using the default localhost#5762, which is no longer valid. Does anyone know how to get this rabbitMQ configuration properties? We already checked the SCDF stream rabbit source/sink log files but couldn't find the information. I know we probably need to check internally whoever set up the SCDF/rabbitMQ in PCF environment, but so far we haven't heard the answers from them.
Also, it appears we can have a different approach that binds both the SCDF stream and the integration application to a separate rabbitMQ instance (instead of using the existing one bundled with the SCDF configuration). Is it a recommended solution?
Thanks,
It is unclear whether you're using the SCDF tile or the SCDF OSS (via manfest.yml) on PCF.
Suppose you're using the OSS, AFA. In that case, you are providing the right RMQ service-instance configuration (that you pre-created) in the manifest.yml, then SCDF would automatically propagate that RMQ service instance and bind it to the apps it is deploying to your ORG/Space. You don't need to muck around with connection credentials manually.
On the other hand, if you are using the SCDF Tile, the SCDF service broker will auto-create the RMQ SI and automatically bind it to the apps it deploys.
In summary, there's no reason to manually pass the connection credentials or pack them as application properties inside your apps. You can automate all this provided you're configuring all this correctly.

Queue Options in Mule Cloudhub

I wanted to use queueing in my Mule applications deployed on cloudhub.
what are the options available?
As per my learning I think if we add VM component then we will be able to see the queue in cloudhub persistence queue option.
I have seen Anypoint MQ connectors as well..
are these two options are same?
If not, then which one is better?
Any other options??
VM queues are very basic point-to-point queues. You won't be able to browse the queue, access it through apis, use publish-subcribe, app to app, org to org and others.
For any non basic point-to-point use case, consider Anypoint MQ. Otherwise, any other cloud messaging solution could be used too if it has the appropriate connector.
use anypoint MQ, its easier to config with client. i suggest anypoint MQ becuz of pub/sub msgs

How can I test a flow with ActiveMq in local

I'm started to work with Mule and Mule Studio (version 3.5): my goal is rewriting some flows that now is workign, but with a bad syntax.
In this moment I have a flow with some JMS connector and JMS endpoint for acquiring data (my flows are using ActiveMQ 5.10): the configuration XML file is ok and I want to test this flow, but I have'nt a big experience in JMS and system integration.
I think to create a JMS producer and, into run,
start up Mule (with all his flows, endpoints, etc, JMS queues);
start the JMS producer: in run the producer
links to name queue defined in configuration Mule
create a message
send this message to Mule
And the test asserts the
Mule receive the message by the producer
Mule don't loss the message
Mule turn this message to correct flow and relative elaboration
My problem is the lack of manuality and pratical work-ability to link Mule and producer: I tried to use http://activemq.apache.org/hello-world.html but the code is useless for me because it work correctly without Mule, but in my case the tests has to fail if Mule is stopped.
Has everybody any suggest, please?
Just set up an activemq connector without addresss, that will use the default address of vm://localhost that instructs the connector and activemq to act as a local embedded server.
<jms:activemq-connector name="JmsConnector" specification="1.1" />

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