How can I connect drupal 6 and activemq? I would like to use publish subscribe technique to send updates to drupal as they happen in an external database. This database has middleware that publishes changes using a messaging system (apache camel).
If you're willing to upgrade to Drupal 7, Services version 3 should interface to (for instance) JSON or SOAP.

Feature of version 3:


  
  Response format API allows you to define response Formats for CONTENT-TYPE ie. application/json or application/xml.
  


Edit: I didn't know about STOMP, which the OP mentions in a comment. I add it here for searches/future reference:


  STOMP is the Simple (or Streaming) Text Orientated Messaging Protocol. The Stomp module implements an alternative Drupal Queue backend for queues supporting the STOMP protocol - such as ActiveMQ, RabbitMQ.


For Drupal 6, there is JSON server.  I am not familiar with it, but you may be able to use that instead.