1
votes

Here's my scenario:

I've configured a messageStore in my WSO2 esb 4.8.1 as follow:

 <messageStore class="org.apache.synapse.message.store.impl.jms.JmsStore"  name="JMSTest">
    <parameter name="java.naming.factory.initial">org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory</parameter>
    <parameter name="java.naming.provider.url">repository/conf/jms-jndi.properties</parameter>
    <parameter name="store.jms.connection.factory">JMSMS</parameter>
    <parameter name="store.jms.JMSSpecVersion">1.1</parameter>
    <parameter name="store.jms.destination">QUEUE</parameter>
</messageStore>    

I followed the configuration indicated by this official tutorial to connect the queue.

The first time a sequence tries to store a message using this store, an error is raised and the message is ignored.

[JMSTest-P-1]. Ignored MessageID : urn:uuid:414f50a0-91d2-4bdf-937b-cc283985c947 [JMSTest-P-1] cannot proceed. Message producer is null.

If I try to store a message during the next 5 minutes, the store will work. But after this kind of timeout the same error will by triggered if I try to store a message.

I've tried to add the store.jms.cache.connection parameter to false, and the transport.jms.CacheLevel parameter to None by editing the sourceView in the admin console, but these parameters are erased if I modify the configuration in the MessageStore tab thus I am not on that they are really used.

Have you an idea towards which look to make so that the messageStore is active all the time?

Thank you for all the answers

1

1 Answers

3
votes

I was able to solve my "timeout" issue by downgrading the qpid library used.

In the official Azure tutorial the qpid version is not specified, so I picked the latest one (qpid 0.32). Do not do it. With qpid 0.26 and the same configuration the issue desappeard. For information the same error occur with qpid 0.30

Below the jars I copied in the lib directory to setting up WSO2 ESB with the Azure Service Bus queue, and the content of my conf file:

< ESB_HOME >/repository/components/lib/

geronimo-jms_1.1_spec-1.0.jar
qpid-amqp-1-0-client-0.26.jar
qpid-amqp-1-0-client-jms-0.26.jar
qpid-amqp-1-0-common-0.26.jar

< ESB_HOME>/repository/conf/jms-jndi.properties

connectionfactory.JMSMS = amqps://<POLICY_NAME>:<BASE64_ENCODE_POLICY_KEY>@<NAMESPACE>.servicebus.windows.net
queue.QUEUE = <QUEUE_NAME>

Be careful, you have to define the policy at the queue level, not the namespace level, and the queue has to be not partitioned at his creation.

I hope this will help some of you.