robert burrell donkin-2 wrote: > > On Dec 1, 2007 6:17 PM, Noel J. Bergman <[EMAIL PROTECTED]> wrote: >> Robert Burrell Donkin wrote: >> >> > Tom Brown wrote: >> > > 3. As SMTP-to-JMS bridge (reverse of #1) >> > > a. JAMES receives mail >> > > b. JAMES publishes mail to specific JMS queue or topic >> > > c. mail is processed/stored/whatever by any interested listeners >> > fancy volunteering to contribute some code to do this? >
Here's the code using Camel :) from("pop3:[EMAIL PROTECTED]"). // we could transform here if we like... to("activemq:MyQueue"); To do 3a) nicer , we might wanna write some James component for Camel so we can effectively use Mailets from inside Camel. So maybe something like... from("james:localhost"). to("activemq:MyQueue"); Then we could do Content Based Routing type stuff etc. http://activemq.apache.org/camel/content-based-router.html We could maybe integrate the various expressions languages in Camel to the Mailet's Matcher stuff (e.g. to use XQuery, OGNL, Groovy or whatnot to filter messages in a Mailet etc). http://activemq.apache.org/camel/languages.html OK I'll quit pimping Camel already! :) robert burrell donkin-2 wrote: > >> The only relevant bit is 3.b, which is a mailet. The mailet would take >> the >> message, formulate some ad-hoc JMS message as desired, and post it to a >> destination: >> >> <destination>...</destination> >> <destination-type>[queue|topic]</destination-type> >> <connection-factory>...</connection-factory> >> <other elements as desired> >> >> A generic base class for this, with an abstract createMessage method, >> would >> let people create their own subclass to provide whatever ad-hoc JMS >> message >> they desire. > > i'd prefer delegation to inheritance > >> An effort of a few moments to code it, leaving configuring JNDI is an >> exercise for the reader. > > probably better to use a generic messaging interface and push JNDI or > local brokering behind it. same interface can then be used for any > MOM. > > efficient operation is a little more effort: session and connection > caching would be are needed for high throughput. commons pool would be > good enough. > > but all in all a nice little project > BTW I'd recommend the Spring JmsTemplate for sending and polling based consumingor MessageListenerConsumer for event driven consuming - it hides all the complexities of the JMS API namely JNDI / threading / pooling / transactions / XA / JCA etc. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com -- View this message in context: http://www.nabble.com/ActiveMQ-tp14037280p14269267.html Sent from the James - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]