Most of the day in meetings today, I did not have a chance to put together
an isolated example.  What I did manage to do re-connect a Spring
JmsTemplate implementation back into my code.  The JmsTemplate
implementation seems to work fine.

Here is how its wired:

    <bean id="jmsStompConnectionFactory"
class="org.fusesource.stomp.jms.StompJmsConnectionFactory">
        <property name="brokerURI" value="tcp://localhost:61623" />
    </bean>

    <bean id="jmsStompTemplate"
class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="jmsStompConnectionFactory"
/>
        <property name="pubSubDomain" value="true" />
    </bean>

In my class:

   @Resource(name="jmsStompTemplate")
    private JmsTemplate
        jmsTemplate;

...

            //Send a stomp message on its way
            //
            jmsTemplate.send(
                //Create a specifically stop destination, regular
destination will not do
                //
                new StompJmsDestination(
                    getTopicName(userId)
                ),

                //Message creator to create a stomp message
                //
                new MessageCreator() {
                    @Override
                    public Message createMessage(final Session session)
throws JMSException {
                        return
                            session.createTextMessage(messageText);
                    }
                }
            );

So, the above appears to work talking to Broker's at tcp://localhost:61623,
recall my broker's configuration is:

        final BrokerService
            broker =
                new BrokerService();

        //Create the network connector
        //
        final TransportConnector
            stompConnector =
                broker.addConnector("stomp+nio://0.0.0.0:61623");


So, the issue does not appear to be on the Broker's side but rather on the
sending side.  Still working on figuring out what the difference is.  By
the way, does anyone know where the code for camel-stomp is, specifically
version 2.12-SNAPSHOT ?

Thanks.
-AP_


On Tue, Aug 27, 2013 at 7:46 AM, Dejan Bosanac [via Camel] <
ml-node+s465427n5738064...@n5.nabble.com> wrote:

> Coupe more things to try.
>
> 1. Use 61613 for the stomp transport in the broker configuration
>
> 2. Use stomp endpoint like <camel:to
> uri="stomp:queue:dm6?brokerUrl=tcp://localhost:61623" /> (use the same
> port you configure in the broker)
>
> If all fails, it's best to create a test case that demonstrate your
> problem, so we can examine it further.
>
> Regards
> --
> Dejan Bosanac
> ----------------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5738064&i=0>
> Twitter: @dejanb
> Blog: http://sensatic.net
> ActiveMQ in Action: http://www.manning.com/snyder/
>
> On Tue, Aug 27, 2013 at 4:07 PM, apara <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5738064&i=1>>
> wrote:
>
> > I tried a number of things:
> >
> > 1) Changing broker configuration to:
> >         final TransportConnector
> >             stompConnector =
> >                 broker.addConnector("stomp+nio://0.0.0.0:61623");
> >
> >
> > 2) Changing my Camel wiring to use tcp:....:61623 instead of
> > stomp:....:61623:
> >
> >     <bean class="org.apache.camel.component.stomp.StompComponent">
> >         <property name="brokerURL" value="tcp://localhost:61623" />
> >     </bean>
> >
> > 3) Changing the route from stomp:queue:dm6 to stomp:queue/dm6:
> >
> >     <camel:camelContext>
> >         <camel:route>
> >             <camel:from uri="direct:sample/engine/user" />
> >             <camel:to uri="stomp:queue/dm6" />
> >         </camel:route>
> >     </camel:camelContext>
> >
> > And still I get the same exception in each of the above changes.  One
> thing
> > to note, I also see a WARN message for unknown data type which I did not
> > notice before:
> >
> > 06:56:56.841 engine [ActiveMQ Transport: tcp:///127.0.0.1:63277@61613]
> WARN
> >  Transport - Transport Connection to: tcp://127.0.0.1:63277 failed:
> > java.io.IOException: Unknown data type: 69
> > 06:56:56.873 engine [main] ERROR ContextLoader - Context initialization
> > failed
> > org.apache.camel.RuntimeCamelException:
> > org.apache.camel.FailedToCreateRouteException: Failed to create route
> > route1 at: >>> To[stomp:queue/dm6] <<< in route:
> > Route(route1)[[From[direct:sample/engine/user]] -> [To[stomp... because
> of
> > Failed to resolve endpoint: stomp://queue/dm6 due to: The maximum
> command
> > length was exceeded
> > at
> >
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344)
>
> > ~[camel-core-2.12-SNAPSHOT.jar:2.12-SNAPSHOT]
> >
> > I am going to go back to try to send messages via JmsTemplate in Spring
> to
> > see if that still works.  Perhaps there was another change that I did
> which
> > I don't remember.  If that does not work, I will know there is something
> > with my configuration.  Perhaps the salad bar of dependencies needs to
> be
> > revisited.
> >
> > If you guys have any other suggestions I can try them out...
> >
> > Thanks for your help.
> > -AP_
> >
> >
> > On Tue, Aug 27, 2013 at 12:49 AM, dejanb [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5738064&i=2>>
> wrote:
> >
> >> Hi, the problem is that you're trying to send stomp messages to
> openwire
> >> transport connector. Try changing your stomp component to something
> like
> >>
> >>    <bean class="org.apache.camel.component.stomp.StompComponent">
> >>         <property name="brokerURL" value="tcp://localhost:61623" />
> >>     </bean>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://camel.465427.n5.nabble.com/STOMP-Exception-The-maximum-command-length-was-exceeded-tp5738017p5738023.html
> >>  To unsubscribe from STOMP: Exception: The maximum command length was
> >> exceeded, click here<
>
> >> .
> >> NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/STOMP-Exception-The-maximum-command-length-was-exceeded-tp5738017p5738059.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/STOMP-Exception-The-maximum-command-length-was-exceeded-tp5738017p5738064.html
>  To unsubscribe from STOMP: Exception: The maximum command length was
> exceeded, click 
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5738017&code=YXBhcmFAc3RhbmRhcmRzZXQuY29tfDU3MzgwMTd8LTU0MjY3MDkwOQ==>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/STOMP-Exception-The-maximum-command-length-was-exceeded-tp5738017p5738088.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to