問題描述
我們可以使用 wso2esb Jms 消費消息嗎 (Can we Consume the Messages using wso2esb Jms)
I am using wso2esb4.7.0 and ActiveMQ 5.8.0 versions i followed wso2esb docs they provided store and forward message store policy But i dont want store i just want to consume those messages which is already has been store by my client application i wish to pool that messages for every 5 sec Is it possible in wso2esb jms using ActiveMq will you write sample code of proxy
<messageProcessor name="Duplicate5" class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor" messageStore="Duplicate" xmlns="http://ws.apache.org/ns/synapse">
<parameter name="interval">1000</parameter>
<parameter name="message.processor.reply.sequence">fault</parameter>
</messageProcessor>
i tried with this but its not working
參考解法
方法 1:
To pull messages from the queue, you need to use JMS transport..Check JMS proxy for the samples..
方法 2:
The message store persists the messages in the form of serializable Java objects. This might contain certain underlying information(E.g.: Properties) which is not visible in the message when you view message details in the ActiveMQ console. The message processor uses such information stored by the store when processing the message. Therefore, as far as I understand, the message store and message processor should be used together if you want to make things functional.
If you're straightaway storing the received messages in ActiveMQ queue, you might have to configure the message consumer manually. Check this usecase [1].
And also look in to this blogpost example to get an idea [2].
[1] http://docs.wso2.org/wiki/display/ESB470/ESB+as+a+JMS+Consumer
[2] http://nuwanwimalasekara.blogspot.com/2013/04/jms‑proxy‑service‑using‑wso2‑esb.html
Hope this helps.
方法 3:
You can not use the Message‑processor alone, You must have combination of Message Store and message processor. if you want to understand the behavior of the Message Store and Message processor refer the blog some time back.
If you want to use listen/pull from the JMS using ESB you have to use ESB as a JMS Consumer. Please refer further on document to implementation detail.
(by faisal shaik、Ratha、Anuradha、Vanji)