Programmatically referring to route/context names within routes,

2014-12-15 Thread Jeremy Gooch
Hi,

I have a generic dead letter queue handler.  Before messages are put onto
the dead letter queue, my routes log details of the exceptions (via an
interceptor within the same context).  I'd like to also stamp the messages
with the route and context from which the exception was thrown.

I could just type the correct names into every interceptor, but it would be
nicer if I could do something like this:

!-- Make the route log the exception before sending to the dead
letter queue --
interceptSendToEndpoint uri={{dead.letter.uri}}
id=deadletter-logger
log logName=jellyfish-messaging loggingLevel=ERROR
message=Dead letter interceptor invoked /
to
uri=log:org.jellyfish.notifications?level=ERRORamp;showCaughtException=trueamp;showStackTrace=trueamp;showException=true
/








*setOutHeader headerName=DLQ-context
 constant{{camel-current-context-id}}/constant
 /setOutHeadersetOutHeader headerName=DLQ-route
 constant{{camel-intercepted-route-id}}/constant
 /setOutHeader*/interceptSendToEndpoint

You'll note that I'm already pulling in the dead letter queue name from
config - i.e. {{dead.letter.uri}}. The magic sauce would be having
environment variables like:-

   - {{camel-current-context-id}}
   - {{camel-intercepted-route-id}}

Is this sort of thing available?
I'm running Camel 2.12.3 and ActiveMQ on 5.7.0.

Thanks,

J.


Client ID for MQTT endpoint.

2014-06-30 Thread Jeremy Gooch
Hi,

Is there a non-documented option for the MQTT endpoint, through which I can
set the client ID?  My Mosquitto MQTT broker currently assigns Camel an
arbitrary ID along the lines of 7f00d901c0b253b144e5.  However, this
isn't much use if I want to use an ACL within Mosquitto in order to secure
topics from anonymous access.

Thanks,

J.


Re: activemq exception

2014-05-12 Thread Jeremy Gooch
I saw something similar - as per my post on Stack Overflow:
http://stackoverflow.com/questions/19365009/activemq-remote-connections-refused-despite-0-0-0-0-in-broker-url

We had the *activemq-web-console* feature enabled, and it was launching its
own ActiveMQ broker, meaning the one we wanted to use was then failing to
start, possibly as per your Address already in use message.

J.


On Mon, May 12, 2014 at 3:43 PM, Reji Mathews contactr...@gmail.com wrote:

 Make sure no other ActiveMQ instance is running.

 Once I had this strange error too. I got this error when I started my
 FuseIDE first and then tried to start jboss fuse. Am still wondering why it
 happened so.

 Can u reboot ur system and start jboss fuse first. After that u try opening
 other development tools.

 Reji
 On 12/05/2014 6:05 pm, komal bhola komalbh...@gmail.com wrote:

  Hi I am getting following exception while starting activemq.
 
  15:27:06,185 | INFO  | veMQ Broker: amq | KahaDBStore
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopping
  async queue tasks^M
  15:27:06,185 | INFO  | veMQ Broker: amq | KahaDBStore
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopping
  async topic tasks^M
  15:27:06,185 | DEBUG | veMQ Broker: amq | ThreadPoolUtils
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Forcing
  shutdown of ExecutorService:
  org.apache.activemq.store.kahadb.KahaDBStore$StoreTaskExecutor@16a71e9^M
  15:27:06,185 | DEBUG | veMQ Broker: amq | ThreadPoolUtils
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Forcing
  shutdown of ExecutorService:
  org.apache.activemq.store.kahadb.KahaDBStore$StoreTaskExecutor@15c977f^M
  15:27:06,185 | INFO  | veMQ Broker: amq | KahaDBStore
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopped
  KahaDB^M
  15:27:06,185 | DEBUG | veMQ Broker: amq | MessageDatabase
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Checkpoint
  started.^M
  15:27:06,350 | DEBUG | veMQ Broker: amq | MessageDatabase
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Checkpoint
  done.^M
  15:27:06,664 | DEBUG | veMQ Broker: amq | ManagementContext
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 |
  Unregistering
  MBean
 
 
 org.apache.activemq:type=Broker,brokerName=amq,Service=PersistenceAdapter,InstanceName=KahaDBPersistenceAdapter[D_\jboss-fuse-6.0.0.redhat-024\jboss-fuse-6.0.0.redhat-024\data\amq\kahadb]^M
  15:27:06,667 | DEBUG | veMQ Broker: amq | ManagementContext
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 |
  Unregistering
  MBean org.apache.activemq:type=Broker,brokerName=amq,service=Health^M
  15:27:06,667 | DEBUG | veMQ Broker: amq | ManagementContext
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 |
  Unregistering
  MBean org.apache.activemq:type=Broker,brokerName=amq^M
  15:27:06,668 | DEBUG | veMQ Broker: amq | ThreadPoolUtils
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Forcing
  shutdown of ExecutorService:
  java.util.concurrent.ThreadPoolExecutor@b5b633^M
  15:27:06,668 | INFO  | veMQ Broker: amq | BrokerService
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Apache
  ActiveMQ 5.8.0.redhat-60024 (amq, ID:LTB0080116-64159-1399888241191-0:51)
  uptime 1.102 seconds^M
  15:27:06,669 | INFO  | veMQ Broker: amq | BrokerService
   |
  114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Apache
  ActiveMQ 5.8.0.redhat-60024 (amq, ID:LTB0080116-64159-1399888241191-0:51)
  is
  shutdown^M
  15:27:06,669 | INFO  | veMQ Broker: amq | ActiveMQServiceFactory
  |
  128 - org.jboss.amq.mq-fabric - 6.0.0.redhat-024 | Broker amq failed to
  start.  Will try again in 10 seconds^M
  15:27:06,670 | INFO  | veMQ Broker: amq | ActiveMQServiceFactory
  |
  128 - org.jboss.amq.mq-fabric - 6.0.0.redhat-024 | Exception on start:
  java.io.IOException: Transport Connector could not be registered in JMX:
  Failed to bind to server socket: tcp://
  0.0.0.0:61616?maximumConnections=1000
  due to: java.net.BindException: Address already in use: JVM_Bind^M
  java.io.IOException: Transport Connector could not be registered in JMX:
  Failed to bind to server socket: tcp://
  0.0.0.0:61616?maximumConnections=1000
  due to: java.net.BindException: Address already in use: JVM_Bind^M
  at
 
 
 org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]^M
  at
 
 
 org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1972)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]^M
  at
 
 
 org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2434)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]^M
  at
 
 
 

Re: Camel with ActiveMQ

2014-04-11 Thread Jeremy Gooch
We run it inside the container.  As per
http://activemq.apache.org/osgi-integration.html the installation is really
easy.

karaf@root() feature:repo-add
mvn:org.apache.activemq/activemq-karaf/5.9.0/xml/features
karaf@root() feature:install activemq-broker


You can see the broker and browse the queues via the webconsole:-

http://localhost:8181/activemqweb/index.jsp

J.


On Fri, Apr 11, 2014 at 4:27 AM, kraythe . kray...@gmail.com wrote:

 We run it standalone. That way you can cluster AMQ servers to increase
 fault tolerance and throughput. With the Zookeeper based database of AMQ
 5.9.0 this is even more powerful.

 *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
 *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
 *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
 http://www.linkedin.com/pub/robert-simmons/40/852/a39*


 On Thu, Apr 10, 2014 at 10:23 PM, chaij jin.c...@indigoarc.com wrote:

  Do people normally run ActiveMQ within Karaf or outside of the container?
 
  If to run it inside of Karaf, what are commands to have AcitveMQ
 installed
  and start?
 
 
 
  --
  View this message in context:
 
 http://camel.465427.n5.nabble.com/Camel-with-ActiveMQ-tp5750002p5750088.html
  Sent from the Camel - Users mailing list archive at Nabble.com.