Is there any relationship between javax.jms.Message and javax.mail.Message?

Rajiv Kanaujia

There is no direct relationship between javax.mail.Message and javax.jms.Message. If your requirement is to map (correlate) them, here is what you can do:

  1. From JMS domain to JavaMail domain (a javax.jms.Message is received):
    1. A JMS topic/queue can be associated with one or many e-mail id(s).
    2. The JMS Message Header can be mapped to ‘custom’ JavaMail Message Header.
    3. The JMS Message Body can be associated with the JavaMail Message body.
    4. A JavaMail client application should be able to process these ‘custom’ headers and the content of the message body.
  2. From JavaMail domain to JMS domain (a javax.mail.Message is received):
    1. An e-mail id can be associated with one or more JMS topics/queues.
    2. The JavaMail Message Header can be mapped to ‘custom’ JMS Message Header.
    3. The JavaMail Message Body can be associated with the JMS Message body.
    4. The JMS client application should be able to process these ‘custom’ headers and the content of the message body.

In a simple application that I tried, I removed the ‘custom’ header scenario and just forwarded the contents of the message (text message), which worked without any problems.

Try using SonicMQ bridges, which already has something like that.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact