WSO2 ESB how get value of JMSReplyTo of imcoming message - wso2-esb

Request messages come in WSO3 ESB through the ActiveMQ.
Jms header "JMSReplyTo" of messages is set to a certain value.
I need to get this value in ESB sequence.
I try use get-property("ReplyTo"), but get no result.
Thanks.

try with get-property('transport','JMSReplyTo')

Related

Spring AMQP RabbitMQ RPC - Queue with with some messages that do not expect a response

I am trying to create a priority RPC queue that can accept some messages that expect a response and some messages that do not expect a response. The problem I am facing is that when I send messages with convertAndSend I get an error saying "org.springframework.amqp.AmqpException: Cannot determine ReplyTo message property value: Request message does not contain reply-to property, and no default response Exchange was set." I know the issue is that the RPC queue is expecting a response, and the message just stays on the queue, but for these messages I do not want/need a response. Any idea how I can work around this issue?
Thanks,
Brian
A solution recommended in this link worked for me: Single Queue, multiple #RabbitListener but different services. Basically I have a class with RabbitListener, and different methods with RabbitHandler

#[message] vs #[payload] in mule ESB

I could see two different objects - message and payload in Mule Esb. But I am not able to understand the actual characteristics of the both. Could anyone kindly help me to understand this?.
The Mule message, #[message] is the data that passes through an application via one or more flows. It consists of two main parts:
The message header, which contains metadata about the message.
The message payload, which contains your business-specific data.
And The message payload #[payload] is the most important part of the Mule message which contains the data your Mule application processes.
Please refer Mule Documentaion for more details.

Persist Correlation Id through HTTP requests

In my mule flow the CorrelationId is set on the message, but after making an outbound http:request, the message loses the Correlation Id.
What is the correct way to prevent the Cid being lost?
UPDATE
No matter what I tried, the CorrelationId is always lost. I've created a JIRA issue demonstrating the difference in behaviour between http:outbound-endpoint and http:request
https://www.mulesoft.org/jira/browse/MULE-8522
I don't believe the CorrelationId is supposed to be lost in this case.
You can set the corrolation id in the message outbound so that it is available in external flow.
You can also look into the example to add Corrolation id in your message before sending to a outbound endpoint :- http://blogs.mulesoft.org/total-traceability/
UPDATE
Then use message enricher which wrapp the HTTP request component and by that way you can get the value from the external service without disturbing your actual payload and existing corrolation id
http://www.mulesoft.org/documentation/display/current/Message+Enricher

Mule:Setting Rest Call response as property in original message payload

Having a scenario where consuming a message from amqp:inboundendpoint and then requesting a call to rest service using HTTP outbound endpoint with request response message exchange pattern. I need to set properties of message payload received from amqp with certain data retrieved in HTTP outbound response. What is the best component to acheive this design. Do i need to call HTTP outbound inside an enricher and then enrich the payload with additional properties retrieved from rest call or is there any other design possible.
The message enritcher was designed exactly for this scenario please take a look a this.
Yes as Victor said, Mule Message Enricher will be a good option to be used in this kind of scenario..
What message enricher actually does is it enrich an incoming message with additional information (That's what your need ) and perform a particular task without disturbing or modifying the original payload...
So in that case, the message processor after enricher will be getting the original payload without being modified... So I can say, your approach is correct and you can go with enricher..
you can find more about enricher :- http://www.mulesoft.org/documentation/display/current/Message+Enricher
and
http://blogs.mulesoft.org/enrich-your-experience-orchestration-and-data-enrichment-with-mule-3-1/

How to Listen data from particular Correlation Id and Queue in Mule

Hi I am working with mule and i am using JMS inbound to listen particular queue. I want to configure my JMS in such a way that if i am pushing data from Active MQ with particular correlation id and that correlation id is already configured in Mule JMS Inbound. It will listen and poll only that. Please share some JMS XML configuration for better understanding.
There is a filter called jms:selector in JMS inbound to select a particular type of message based on it's properties
Now, as you said you are pushing a message from ActiveMQ with a particular corelation id so, you can select the message to consume in your Mule based on that particular corelation id as follows :-
<jms:inbound-endpoint queue="reply"
connector-ref="Active_MQ" exchange-pattern="one-way"
doc:name="JMS-REPLY"/ >
<jms:selector expression="JMSCorrelationID='your corelation id'"/>
</jms:inbound-endpoint>
You can see, the example here :- Mule request-reply consuming all the messages in the JMS reply queue
But, again, I would suggest you not to filter a message based corelation id, if that corelation id is not defined in your message you are pushing or you are not setting as static id, it may unable to consume if the corelation id differs.
So, rather I would suggest you to filter the message based on message priority,which is the best way to filter JMS messages.
Here is how, you can set a message priority in Mule flow itself on JMS messages and consume it based on that priority property :-
Mule: JMS reply queue consumes all the messages. I want to process messages that coming to reply queue