1 2 3 4 5 Previous Next 63 Replies Latest reply on Mar 19, 2008 2:39 AM by beve Go to original post
      • 15. Re: Trouble with jms-topic
        beve

        Ah, sorry it might not be in the GA.

        But if you like you can check out the main trunk from svn:

        svn co http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/
        


        You'll find it under product/quickstarts.

        Regards,

        Daniel

        • 16. Re: Trouble with jms-topic
          standard

          Hi,

          I tried it now with the TopicNotifier.
          I defined the action like this, for the publisher service.

          
          <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
           <property name="okMethod" value="notifyOK" />
           <property name="notification-details">
           <NotificationList type="ok">
           <target class="NotifyTopics">
           <topic jndiName="topic/topic_name"/>
           </target>
           </NotificationList>
           </property>
          </action>
          
          


          The publisher service gets his message from another service over ServiceInvoker,
          where the message is build & send like that:

          
          
          System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
          Message esbMessage = MessageFactory.getInstance().getMessage();
          
          Call call = new Call();
          call.setMessageID(new URI(UUID.randomUUID().toString()));
          esbMessage.getHeader().setCall(call);
          esbMessage.getBody().add("msg", xmlAsString);
          
          new ServiceInvoker("Category", "Publisher-Service").deliverAsync(esbMessage);
          
          


          The subscriber listens with this:

          
          <jms-bus busid="topicBus">
           <jms-message-filter
           dest-type="TOPIC"
           dest-name="topic_name"
           />
          </jms-bus>
          
          
          <jms-listener name="topicListener"
           busidref="topicBus"
           maxThreads="1"
          />
          
          


          When I run this I get that error-message again:

          21:05:39,640 ERROR [JmsCourier] Unsupported JMS message type: org.jboss.jms.message.TextMessageProxy
          


          and my subcriber doesn't receive any message.

          Do I have to build the esbMessage in any special way for this to work?
          I think I did it pretty mutch the same as in the TopicNotifier QS.
          Could it be that it doesn't work because of my ESB version?

          Thanks again for the help!

          Regards
          Andreas


          • 17. Re: Trouble with jms-topic
            beve

            Hey Andreas,

            yeah, that might be the case or that there are still old TextMessages waiting in the Topic.

            Could you try running the quickstart against the main trunk.
            If you run 'ant dist' from the product directory it will create an ESB server in build/jbossesb-server-4.2.1GA.

            Then update samples/quickstarts/conf/quickstart.properties and set:

            org.jboss.esb.server.home=${product.dir}/build/jbossesb-server-4.2.1GA
            


            Thanks,

            Daniel

            • 18. Re: Trouble with jms-topic
              beve

              Hi Andreas,

              I just tried running the quickstart and that works fine with ESB server built from the trunk.
              Is updating an option for you?

              Regards,

              Daniel

              • 19. Re: Trouble with jms-topic
                standard

                Hi,

                I checked the unchanged quickstart in my version, just to be sure,
                and I got the same error.

                I have to check if changing the version is possible for me.
                I guess there is no chance that changing a few libs or something does the trick :-)?

                In the meantime I would be glad for any alternative tips on how to realize this,
                because I'm really not that fixed on topics or something,
                anything that somehow realizes the publisher/subscriber concept I need
                would be fine with me. If all else fails, and I can't change versions, I guess I have to use plain JMS, and not the esb mechanisms.


                Thanks so far for the help!

                Regards
                Andreas

                • 20. Re: Trouble with jms-topic
                  standard

                  Hi,
                  I just ran the quickstart in the trunk version, and got the error

                  [JmsComposer] Unsupported JMS message type: org.jboss.jms.message.TextMessageProxy
                  


                  so its not the JmsCourier this time :-).

                  The thing is, i use my subscriber service to catch the message from the topic (setup is still as described earlier),
                  because i didn't find anything in the quickstart itself, that does listen on the topic. So my guess now is, the error lies somewhere there.
                  Did you test the quickstart with a topic listener, if so could you tell my how it's set up?
                  Or did i just overlooked the listener in the quickstart?


                  Regards
                  Andreas

                  • 21. Re: Trouble with jms-topic
                    beve

                    Hi,

                    this is strange...I've run the same example and I don't get any error.

                    Just to recap... you are using the ESB server built from the main trunk?
                    You are running the helloworld_topic_notifier against the ESB server from the main trunk and getting this error :

                    [JmsComposer] Unsupported JMS message type: org.jboss.jms.message.TextMessageProxy
                    


                    Thanks,

                    Daniel



                    • 22. Re: Trouble with jms-topic
                      standard

                      Hi,

                      yea, both esb and the quickstart are from the main trunk.
                      But like I sayed, I'm using one of my services to pick the message from the
                      topic.
                      I just checked running the quickstart without my receiving service, and I don't get the error here either.

                      So I am guessing the problem should lie with the receiving component.
                      I also found the component that should pick the message from the topic in the quickstart, but it's not an esb-service.
                      So it seems, the error only is generated when picking up the message from the topic with an esb-service (with listeners & stuff).

                      Regards
                      Andreas

                      • 23. Re: Trouble with jms-topic
                        beve

                        Hey,

                        I just modified the quickstart, added a listener to the topic and got the same error you got:

                        11:48:01,088 ERROR [JmsComposer] Unsupported JMS message type: org.jboss.jms.message.TextMessageProxy
                        

                        I'll look into this and get post back

                        Regards,

                        Daniel

                        • 24. Re: Trouble with jms-topic
                          standard

                          Thanks :-)

                          • 25. Re: Trouble with jms-topic
                            beve

                            Ok, sorry about the confusion here. A notifier is intended for sending out from the ESB and not within the ESB.

                            I've tested with this jboss-esb-unfiltered.xml for the helloworld_notify_topic quickstart :

                            <?xml version = "1.0" encoding = "UTF-8"?>
                            <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
                            
                             <providers>
                             <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
                             jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                             jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
                            
                             <jms-bus busid="quickstartNotifierChannel">
                             <jms-message-filter
                             dest-type="QUEUE"
                             dest-name="queue/quickstart_helloworld_topic_notifier_Request_gw"
                             />
                             </jms-bus>
                             <jms-bus busid="quickstartEsbChannel">
                             <jms-message-filter
                             dest-type="QUEUE"
                             dest-name="queue/quickstart_helloworld_topic_notifier_Request_esb"
                             />
                             </jms-bus>
                             <jms-bus busid="quickstartEsbTopicChannel">
                             <jms-message-filter
                             dest-type="TOPIC"
                             dest-name="topic/helloworldtopic"
                             />
                             </jms-bus>
                             </jms-provider>
                            
                             </providers>
                            
                             <services>
                             <service
                             category="routerToFile"
                             name="FileRouterListener"
                             description="Static route file destination">
                             <listeners>
                             <jms-listener name="helloWorldNotifier"
                             busidref="quickstartNotifierChannel"
                             maxThreads="1"
                             is-gateway="true"
                             />
                             <jms-listener name="helloWorld"
                             busidref="quickstartEsbChannel"
                             maxThreads="1"
                             />
                             </listeners>
                             <actions>
                             <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
                             <property name="okMethod" value="notifyOK" />
                             <property name="notification-details">
                             <NotificationList type="ok">
                             <target class="NotifyConsole"/>
                             <target class="NotifyFiles">
                             <file append="false" URI="@results.dir@/results.log"/>
                             <file append="false" URI="@tmp.dir@/HelloWorldFileNotifierTest.log"/>
                             </target>
                             </NotificationList>
                             </property>
                             </action>
                             <action name="jmsrouter" class="org.jboss.soa.esb.actions.routing.JMSRouter">
                             <property name="jndiName" value="topic/helloworldtopic" />
                             </action>
                             </actions>
                             </service>
                             <service
                             category="helloworld_topic_notifier"
                             name="TopicListener"
                             description="Topic listener">
                             <listeners>
                             <jms-listener name="topicListener"
                             busidref="quickstartEsbTopicChannel"
                             maxThreads="1"
                             />
                             </listeners>
                             <actions>
                             <action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
                             <property name="message" value="Topic Listener"/>
                             </action>
                             </actions>
                             </service>
                            
                             </services>
                            </jbossesb>
                            


                            I also think I found a bug in the JMSCourier (well you did) and I've created a jira for it :
                            http://jira.jboss.com/jira/browse/JBESB-1583

                            I'm running though all the tests for this right now and will post back when this is checked in.

                            Regards,

                            Daniel

                            • 26. Re: Trouble with jms-topic
                              beve

                              Hi Andreas,

                              I've commited the change now. Can you update and rebuild the server and see if this works for you now?
                              Sorry about this.

                              Regards,

                              Daniel

                              • 27. Re: Trouble with jms-topic
                                standard

                                Hi,

                                will check if it works.

                                Any chance i can patch that fix into my version :-)?

                                Anyways thanks for all the help,
                                really appreciate it!

                                Regards
                                Andreas

                                • 28. Re: Trouble with jms-topic
                                  beve

                                  You can by replacing jbossesb-rosetta.jar in

                                  deploy/jbossesb.sar/lib/jbossesb-rosetta.jar
                                  deploy/soapui-client.sar/jbossesb-rosetta.jar
                                  

                                  And replacing jbossesb-config-model.jar in
                                  deploy/jbossesb.sar/lib/jbossesb-config-model.jar
                                  

                                  in your current server with the ones for generated for the trunk build, and that should work.

                                  Regards,

                                  Daniel

                                  • 29. Re: Trouble with jms-topic
                                    standard

                                    Thanks!
                                    That makes things allot easier for me :-D.

                                    Regards
                                    Andreas