0

I've got a fast producer ESB (converts CSV to XML) and a slow consumer ESB (performing zip/base64/SOAP wrapping of the XML). The ESBs communicate via a JMS topic. This design is legacy and cannot be changed. When a large CSV file is processed, JBoss AS (5.2) grinds to a halt as the producer is flooding out the consumer, this is even with a heap-size of 4096M. Forgive me I'm new to JBoss/JMS and finding it all bewildering.

Producer sending config

<action class="com.example.FooAction" name="ProcessFoo">
    <property name="springJndiLocation" value="FooEsbSpring" />
    <property name="exceptionMethod" value="exceptionHandler" />
    <property name="okMethod" value="processSuccess" />
    <property name="jndiName" value="topic/FooTopic" />
    <property name="connection-factory" value="ConnectionFactory" />
    <property name="unwrap" value="true" />
    <property name="security-principal" value="guest" />
    <property name="security-credential" value="guest" />
</action>

Producer sending code:

Message msg = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
msg.getBody().add(foo); // foo is the business specific message
new JMSRouter(config).process(msg);

Consumer receiving config:

<jms-jca-provider connection-factory="ConnectionFactory" name="FooMessaging">
    <jms-bus busid="fooChannel">
        <jms-message-filter dest-name="topic/FooTopic"
            dest-type="TOPIC" transacted="false" />
    </jms-bus>
    <activation-config>
        <property name="dLQMaxResent" value="1" />
    </activation-config>
</jms-jca-provider>

Topic config

<server>
<mbean code="org.jboss.jms.server.destination.TopicService"
    name="jboss.esb.quickstart.destination:service=Topic,name=FooTopic"
    xmbean-dd="xmdesc/Queue-xmbean.xml">
    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
    </depends>
    <depends>jboss.messaging:service=PostOffice</depends>
</mbean>
</server>

Things I've tried so far.

  • Run the publisher ESB without the consumer ESB - as expected no problems.
  • Lots of googling, looking for existing questions on stackoverflow
  • Found some references to rate limiting but I can't see how to fit these into my config.
  • I've tried to find an API to discover how many messages are already on the topic unprocessed (with the hope I can implement my own back-off strategy).
  • Looked at this documentation.
Adam
  • 35,919
  • 9
  • 100
  • 137
  • I've just found a MaxSize (previously MaxDepth) attribute for the topic config - testing at moment: http://docs.jboss.org/jbossmessaging/docs/userguide-1.4.5.GA/html/configuration.html – Adam Aug 22 '12 at 09:11

1 Answers1

1

Look at this section 6.3.17.2. org.jboss.mq.server.jmx.Topic and use the 'Depth' related attributes using JMX.

It might help you build the back-off strategy you're looking for

Haim Sulam
  • 316
  • 1
  • 5