1 Reply Latest reply on Jun 30, 2011 1:58 AM by beve

    Smooks splitting and publishing to Topic?

    kimba74

      Hi everyone,

       

      I have the following problem:

       

      We receive a very large XML message that contains document information about multiple documents. The XML structure for each document looks like this:

       

      <documentContainer>

           <documentId>...</documentId>

           <documentContent>...</documentContent>

      </documentContainer>

       

      So far I was successful with splitting the message into chunks each representing one document. The part that I'm still struggling with is: I have to post each chunk as message on a Topic (not a Queue). I followed the Smooks example about routing to JMS but unfortunately every example was routing to a Queue. When using the following smooks JMS Router configuration:

       

      <jms:router routeOnElement="documentContainer" beanId="singleDocument" destination="topic/MyTestTopic">

           <jms:message>

                <jms:correlationIdPattern>${documentPack.documentId}</jms:correlationIdPattern>

           </jms:message>

      </jms:router>

       

      My JBossESB errors out telling me that it cannot cast a JBossTopic into a JMSQueue, which is correct. Now my question, can someone give me an idea how I can tell the JMS Router configuration that the destination is a Topic and not a Queue?

       

      I highly appreciate any help,

       

      Steffen