6 Replies Latest reply on Nov 7, 2008 2:34 AM by Chris Sun

    MessagePersister and Message Redelivery problem

    Chris Sun Newbie

      For days I simply try to set the destination of a message, persist it to the RDLVR-queue and let the MessageRedeliverer deliver it to the specified destination.

      I read http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116023&postdays=0&postorder=asc&start=10,
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117000 and the docu.

      I modified the simplest helloworld-example:

      ESBMessageSender (faultTo can only be set by a sender.. so I did! ):

      Message esbMessage = MessageFactory.getInstance().getMessage();
       final LogicalEPR logicalEpr = new LogicalEPR("fault","faultToService");
       esbMessage.getHeader().getCall().setFaultTo(logicalEpr); // affects nothing !
       esbMessage.getHeader().getCall().setReplyTo(logicalEpr); // my stupid attempt ;-)
       esbMessage.getBody().add("body");
      
       final ServiceInvoker si = new ServiceInvoker("FirstServiceESB", "SimpleListener");
       si.deliverAsync(esbMessage);


      <services>
       <service category="FirstServiceESB" name="SimpleListener"
       description="Hello World">
       <listeners>
       <jms-listener name="JMS-Gateway" busidref="quickstartGwChannel"
       is-gateway="true" />
       <jms-listener name="helloWorld" busidref="quickstartEsbChannel" />
       </listeners>
      
       <actions mep="OneWay">
       <action name="persist"
       class="org.jboss.soa.esb.samples.quickstart.helloworld.PersistAction"/>
      
       <action name="PersistAction" class="org.jboss.soa.esb.actions.MessagePersister">
       <property name="classification" value="RDLVR" />
       <property name="message-store-class"
       value="org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl" />
       </action>
       </actions>
       </service>
      
       <service name="faultToService" category="fault" invmScope="GLOBAL" description="print a testmessage">
       <actions mep="OneWay">
       <action name="action1" class="org.jboss.soa.esb.actions.SystemPrintln">
       <property name="message" value="############# FAULTSERVICE" />
       </action>
       </actions>
       </service>
       </services>
      



      23:20:21,915 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ ]
      java.lang.NullPointerException
       at org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl.redeliver(DBMessageStoreImpl.java:392)
      23:20:21,915 WARN [ActionProcessingPipeline] No fault address defined for fault message!
      
      


      No matter if I use synchronous or asynchronous invoking, the message is stored to DLQ.