Anchor | ||||
---|---|---|---|---|
|
Table of Contents | ||||
---|---|---|---|---|
|
...
With the publish/subscribe model, the sender, now called a publisher, again sends messages to an agreed destination. The destination is known as a topic by convention, and this time there might be many receivers that are called subscribers. Messages are immediately delivered to all current subscribers, and deleted when all the subscribers have received the message.
...
How to configure WSO2
...
EI to behave as a message consumer?
Refer to section WSO2 EI as a JMS Consumer.
...
How to configure WSO2
...
EI to behave as a message producer?
Refer to section WSO2 EI as a JMS Producer.
...
For better performance, it is important to cache JMS objects such as JMS connections, sessions, producers and consumers. JMS transport, when used with WSO2 ESB EI for example, has the ability to cache the mentioned JMS objects.
The parameter transport.jms.CacheLevel is use to configure the cache level required. It can be configured either as a proxy service parameter (when acting as a consumer), or as a parameter in the connection factory definition in <ESB<EI_HOME>/
repository/conf/axis2/axis2.xml
file's JMS transport sender element.
The parameter can have the following values.
...
This can be achieved with the following configuration. R eplace the following line according to your end point URI: <address uri=" http://localhost:9000/services/SimpleStockQuoteService "/>.
Code Block | ||
---|---|---|
| ||
<definitions xmlns="http://ws.apache.org/ns/synapse"> <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry"> <parameter name="cachableDuration">15000</parameter> </registry> <proxy name="StockQuoteProxy" transports="http" startOnLoad="true" trace="disable"> <description/> <target> <inSequence> <property name="OUT_ONLY" value="true"/> <clone> <target> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </target> <target sequence="test"/> </clone> </inSequence> <outSequence> <send/> </outSequence> </target> </proxy> <sequence name="test"> <payloadFactory> <format> <ns:a xmlns:ns="http://services.samples"> <ns:b>Accepted</ns:b> </ns:a> </format> </payloadFactory> <property name="HTTP_SC" value="202" scope="axis2"/> <header name="To" action="remove"/> <property name="RESPONSE" value="true"/> <send/> </sequence> <sequence name="fault"> <log level="full"> <property name="MESSAGE" value="Executing default 'fault' sequence"/> <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/> <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/> </log> <drop/> </sequence> <sequence name="main"> <in> <log level="full"/> <filter source="get-property('To')" regex="http://localhost:9000.*"> <send/> </filter> </in> <out> <send/> </out> <description>The main sequence for the message mediation</description> </sequence> </definitions> |
...
Does WSO2
...
EI implement JMS queues with disk persistence?
If the broker supports JMS message persistence, the ESB WSO2 EI can read/write from a persistence message queue.
...
How does WSO2
...
EI manage message recalling when the destination queue cannot be reached?
You can define message stores to handle failed messages.
...
2. Add the following parameters to the data service. If the ESBWSO2 EI's management console UI is used to add them, y ou can add the name first and then enter the values after saving.
...
You can then retrieve these values using get-property
function (e.g., get-property('transport','JMS_PRIORITY')
).
...