I added a log statement to record the endpoint name I am trying to send to. Now my code looks like this:
final String endpointName = "activemq:temp:queue:" + temporaryQueue.getQueueName(); log.info("sending to endpointName = '" + endpointName + "'"); producerTemplate.sendBody(endpointName, notification); I get this endpointName logged just before the camel exception: 08:47:38,178 | INFO | tenerContainer-1 | SDSSFlightPublisher | face.service.SDSSFlightPublisher 154 | sending to endpointName = 'activemq:temp:queue:ID:mwgk-60813-1265813257931-0:0:1' 08:47:38,292 | WARN | tenerContainer-1 | faultManagementLifecycleStrategy | faultManagementLifecycleStrategy 187 | Could not register Endpoint MBean for uri: activemq://temp:queue:ID:mwgk-60813-1265813257931-0:0:1 org.springframework.jmx.export.metadata.InvalidMetadataException: No ManagedResource attribute found for class: class org.apache.camel.component.jms.JmsTemporaryQueueEndpoint Are you saying this is incorrect? I am confused. "activemq:temp:queue:<temporary queue name>" is the syntax shown here: http://camel.apache.org/jms.html What is the correct syntax to use to send to a temporary queue? If what I am doing is incorrect, I think the documentation must be incorrect. Claus Ibsen-2 wrote: > > Hi > > The WARN is ignored by Camel. However it should send the message. I > think you set the endpoint name wrong > > final String endpointName = "activemq:temp:queue:" > + temporaryQueue.getQueueName(); > > You should probably not add the temp:queue stuff. Do a system out and > see what the queue name outputs so you are 100% sure you create a > correct endpoint name. > > > > On Wed, Feb 10, 2010 at 3:36 PM, ariekenb <aaron.j.riekenb...@lmco.com> > wrote: >> >> Claus - >> >> The exception is logged as WARN. No exception is thrown out of the >> ProducerTemplate.sendBody call however. >> >> More importantly, no message is ever actually sent to the TemporaryQueue. >> The client listening to the TemporaryQueue does not receive any message, >> and >> JConsole shows the EnqueueCount for the TemporaryQueue remains at 0. >> >> Here is a more complete stack trace showing the error message and log >> level: >> >> 08:30:43,389 | WARN | tenerContainer-1 | >> faultManagementLifecycleStrategy | >> faultManagementLifecycleStrategy 187 | Could not register Endpoint MBean >> for uri: activemq://temp:queue:ID:mwgk-45812-1265812243018-0:0:1 >> org.springframework.jmx.export.metadata.InvalidMetadataException: No >> ManagedResource attribute found for class: class >> org.apache.camel.component.jms.JmsTemporaryQueueEndpoint >> at >> org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.populateMBeanDescriptor(MetadataMBeanInfoAssembler.java:279) >> at >> org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler.getMBeanInfo(AbstractMBeanInfoAssembler.java:69) >> at >> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:202) >> at >> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:193) >> at >> org.apache.camel.management.ManagedManagementStrategy.manageNamedObject(ManagedManagementStrategy.java:69) >> at >> org.apache.camel.management.ManagedManagementStrategy.manageObject(ManagedManagementStrategy.java:62) >> at >> org.apache.camel.management.DefaultManagementLifecycleStrategy.onEndpointAdd(DefaultManagementLifecycleStrategy.java:185) >> at >> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:432) >> at >> org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(DefaultProducerTemplate.java:402) >> at >> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:116) >> >> >> >> >> Claus Ibsen-2 wrote: >>> >>> Hi >>> >>> On Tue, Feb 9, 2010 at 7:46 PM, ariekenb <aaron.j.riekenb...@lmco.com> >>> wrote: >>>> >>>> I'm running apache-servicemix 4.1.0-psc-01-00RC1, using the included >>>> version >>>> of ActiveMQ and Camel. I have some code that's receiving a message >>>> from >>>> an >>>> ActiveMQ queue, then sending a message to the temporary queue it got >>>> from >>>> JMSReplyTo. >>>> >>>> �...@endpointinject >>>> private ProducerTemplate producerTemplate = null; >>>> >>>> >>>> �...@consume(uri = "subscriptionRequestEndpoint") >>>> public synchronized void processSubscriptionRequest( >>>> �...@header("JMSReplyTo") Destination jmsReplyTo, >>>> �...@body SubscriptionManagerRegister >>>> registrationMessage) { >>>> try { >>>> log.info("got registration request client name = >>>> " >>>> + >>>> registrationMessage.getClientName() + " jmsReplyTo = " >>>> + jmsReplyTo); >>>> tempQueueList.add((TemporaryQueue) jmsReplyTo); >>>> publishMessageToSubscriber((TemporaryQueue) >>>> jmsReplyTo, "hello"); >>>> } catch (Exception e) { >>>> log.warn("processSubscriptionRequest", e); >>>> } >>>> } >>>> >>>> public synchronized void publishMessageToSubscriber( >>>> TemporaryQueue temporaryQueue, Serializable >>>> message) { >>>> try { >>>> final String endpointName = >>>> "activemq:temp:queue:" >>>> + temporaryQueue.getQueueName(); >>>> producerTemplate.sendBody(endpointName, >>>> message); >>>> } catch (Exception e) { >>>> log.warn("publishMessageToSubscriber", e); >>>> } >>>> } >>>> >>>> When the producerTemplate.sendBody call runs, I get the following >>>> exception. >>>> Is this a camel bug or am I doing something wrong? >>>> >>>> org.springframework.jmx.export.metadata.InvalidMetadataException: No >>>> ManagedResource attribute found for class: class >>>> org.apache.camel.component.jms.JmsTemporaryQueueEndpoint >>>> at >>>> org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.populateMBeanDescriptor(MetadataMBeanInfoAssembler.java:279) >>>> at >>>> org.springframework.jmx.export.assembler.AbstractMBeanInfoAssembler.getMBeanInfo(AbstractMBeanInfoAssembler.java:69) >>>> at >>>> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:202) >>>> at >>>> org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:193) >>>> at >>>> org.apache.camel.management.ManagedManagementStrategy.manageNamedObject(ManagedManagementStrategy.java:69) >>>> at >>>> org.apache.camel.management.ManagedManagementStrategy.manageObject(ManagedManagementStrategy.java:62) >>>> at >>>> org.apache.camel.management.DefaultManagementLifecycleStrategy.onEndpointAdd(DefaultManagementLifecycleStrategy.java:185) >>>> at >>>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:432) >>>> at >>>> org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(DefaultProducerTemplate.java:402) >>>> at >>>> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:116) >>>> >>>> >>> >>> At what level do this stacktrace get logged? ERROR, DEBUG, INFO etc? >>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Attemp-to-send-message-to-activemq-temporary-queue-using-producerTemplate%3A-InvalidMetadataException-tp27520096p27520096.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Attemp-to-send-message-to-activemq-temporary-queue-using-producerTemplate%3A-InvalidMetadataException-tp27520096p27532128.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > > -- View this message in context: http://old.nabble.com/Attemp-to-send-message-to-activemq-temporary-queue-using-producerTemplate%3A-InvalidMetadataException-tp27520096p27532370.html Sent from the Camel - Users mailing list archive at Nabble.com.